Ejemplo n.º 1
0
        public ActionResult Detail(int id)
        {
            PlanCategoryInfo info = PlanCategoryBLL.GetList(p => p.ID == id).FirstOrDefault();


            return(View(info));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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());
 }
Ejemplo n.º 4
0
        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));
        }