62,074
社区成员
发帖
与我相关
我的任务
分享
var stus = from t1 in context.Student
join t2 in context.Teacher on t1.teacherid equals t2.id
join t3 in context.Class on t1.gradeid + t1.classid equals t3.gradeid + t3.classid
select new
{
stuid = t1.id,
stuname = t1.name,
stugender = t1.gender,
stuage = t1.age,
stubirthday = t1.birthday,
stuaddress = t1.address,
stuidentity = t1.identityid,
stumobile = t1.mobile,
teaname = t2.name,
t3.classdesc
};
var result = (from s in stus where s.stuid == stuid select s).FirstOrDefault();
//ViewData["stuinfo"] = result;
ViewBag.stuinfo = result;
@{dynamic student = ViewBag.stuinfo;}
姓名: <input class="easyui-textbox" name="stuname" value="@student.stuname" data-options="iconCls:'icon-ok'" style="width:200px">