62,046
社区成员
发帖
与我相关
我的任务
分享
$.get("/student/getinfo", { "stuid": nodeid + '01' }, function (data, status) {
var student = $.parseJSON(data);
if (!$("#content").tabs('exists', sessionid)) {
//限制最多只能打开15个会话
if ($("#content").tabs('tabs').length >= 15) {
$.messager.alert('错误', '您打开的窗口太多啦!', 'error');
return;
}
//添加新会话
$("#content").tabs('add', {
title: sessionid,
//content: data,
iconCls: 'icon-reload',
closable: true
});
} else {
$("#content").tabs('select', sessionid); //选择指定标题的会话
}
});
public string GetInfo()
{
string stuid = Request["stuid"] ?? "";
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
where t1.id == stuid
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
};
if (stus.Count() > 0)
{
return Json(stus.FirstOrDefault()).Data.ToString();
}
else
{
return string.Empty;
}
}
return PartialView();
你可以在部分页中写好代码
在控制器中返回模型、
content的内容加载部分页就好了