public ActionResult Detail(int id) { PlanCategoryInfo info = PlanCategoryBLL.GetList(p => p.ID == id).FirstOrDefault(); return(View(info)); }
public ActionResult Index(int page = 1) { var list = PlanCategoryBLL.GetList(p => p.ID != Wechat.Controllers.ResearchPersonController.PlanCategoryPersonalID); list = list.OrderByDescending(p => p.Enable).ThenByDescending(p => p.ID); IPagedList <PlanCategoryInfo> result = list.ToPagedList(page, PageSize); return(View(result)); }
public ActionResult Create() { infoHead.LeftURL = Url.Action("index"); GetSelectList(); ViewBag.listPlanCategory = PlanCategoryBLL.GetList(a => a.Enable).OrderByDescending(a => a.ID) .ToList().Select(a => new SelectListItem() { Text = a.Name, Value = a.ID.ToString() }); return(View()); }
public ActionResult Edit(int id) { infoHead.LeftURL = Url.Action("Detail", new { id = id }); GetSelectList(); ResearchPlanInfo info = ResearchPlanBLL.GetList(p => p.ID == id).FirstOrDefault(); ViewBag.listPlanCategory = PlanCategoryBLL.GetList(a => a.Enable || a.ID == info.CategoryID).OrderByDescending(a => a.ID) .ToList().Select(a => new SelectListItem() { Text = a.Name, Value = a.ID.ToString() }); return(View(info)); }