|
|
@ -274,79 +274,6 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
sql = string.Format(sql, param.menuName, App.User.ID, param.langId); |
|
|
|
sql = string.Format(sql, param.menuName, App.User.ID, param.langId); |
|
|
|
result.JM_PageControlT1.Toolbar = DbAccess.QueryList<Toolbar>(sql); |
|
|
|
result.JM_PageControlT1.Toolbar = DbAccess.QueryList<Toolbar>(sql); |
|
|
|
|
|
|
|
|
|
|
|
#region 特殊处理 |
|
|
|
|
|
|
|
var toolbar = new Toolbar(); |
|
|
|
|
|
|
|
var index = -1; |
|
|
|
|
|
|
|
switch (param.menuName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case "F_QuestionBank": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; } |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperDraft": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index = result.JM_PageControlT1.Toolbar.FindIndex(x => x.fnKey == "TBD1YN"); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(index + 1, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "发布", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperReleased": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "取消发布", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(1, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD5YN", |
|
|
|
|
|
|
|
fnTitle = "停用", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperDisabled": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "启用", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region 定义表格页面的栏位, 含 表格栏位, 常用查询栏位, 高级查询栏位,可编辑栏位 |
|
|
|
#region 定义表格页面的栏位, 含 表格栏位, 常用查询栏位, 高级查询栏位,可编辑栏位 |
|
|
@ -919,6 +846,79 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 特殊处理 |
|
|
|
|
|
|
|
var toolbar = new Toolbar(); |
|
|
|
|
|
|
|
var index = -1; |
|
|
|
|
|
|
|
switch (param.menuName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case "F_QuestionBank": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; } |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperDraft": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "NewYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD1YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "UpdateYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD2YN"; } |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index = result.JM_PageControlT1.Toolbar.FindIndex(x => x.fnKey == "TBD1YN"); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(index + 1, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "发布", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperReleased": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "取消发布", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-publish", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(1, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD5YN", |
|
|
|
|
|
|
|
fnTitle = "停用", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-icon-stop", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "F_ExamPaperDisabled": |
|
|
|
|
|
|
|
toolbar = result.JM_PageControlT1.Toolbar.Where(x => x.fnKey == "DetailYN").FirstOrDefault(); |
|
|
|
|
|
|
|
if (toolbar != null) { toolbar.fnKey = "TBD3YN"; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
display = true, |
|
|
|
|
|
|
|
fnKey = "TBD4YN", |
|
|
|
|
|
|
|
fnTitle = "启用", |
|
|
|
|
|
|
|
fnType = "table", |
|
|
|
|
|
|
|
icon = "ghr-icon-start", |
|
|
|
|
|
|
|
position = "left" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
return new ServiceResult<ModuleReturn>() { Success = true, Message = "查询成功", Data = result, }; |
|
|
|
return new ServiceResult<ModuleReturn>() { Success = true, Message = "查询成功", Data = result, }; |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|