public ActionResult Edit(int id) { TemplateSubjectSummaryInfo info = TemplateSubjectSummaryBLL.GetList(p => p.ID == id).FirstOrDefault(); ViewBag.listSort = Common.GetListOrderID(); return(View(info)); }
public ActionResult Create(int TemplateID) { TemplateSubjectSummaryInfo info = new TemplateSubjectSummaryInfo(); info.TemplateID = TemplateID; ViewBag.listSort = Common.GetListOrderID(); return(View(info)); }
public ActionResult Create(TemplateSubjectSummaryInfo info) { if (string.IsNullOrEmpty(info.KeyName)) { return(Json(new APIJson(0, "请填写名称"))); } if (TemplateSubjectSummaryBLL.Create(info).ID > 0) { return(Json(new APIJson(0, "提交成功", new { info.ID }))); } return(Json(new APIJson(-1, "提交失败,请重试"))); }
public ActionResult Edit(TemplateSubjectSummaryInfo info) { TemplateSubjectSummaryInfo infoExist = TemplateSubjectSummaryBLL.GetList(p => p.ID == info.ID).FirstOrDefault(); if (string.IsNullOrEmpty(info.KeyName)) { return(Json("请填写名称")); } infoExist.KeyName = info.KeyName; infoExist.SortID = info.SortID; infoExist.Enable = info.Enable; if (TemplateSubjectSummaryBLL.Edit(infoExist)) { return(Json(new APIJson(0, "提交成功"))); } return(Json(new APIJson(-1, "提交失败,请重试"))); }
public ActionResult Detail(int id) { TemplateSubjectSummaryInfo info = TemplateSubjectSummaryBLL.GetList(p => p.ID == id).FirstOrDefault(); return(View(info)); }