Example #1
0
        public ActionResult Edit(int ID)
        {
            PeriodCateViewModel model = new PeriodCateViewModel();
            var entity = PeriodCateService.Find(ID);

            model.CateName = entity.CateName;
            model.ID       = entity.ID;
            model.Code     = entity.Code;

            model.Level      = entity.Level;
            model.OrderIndex = entity.OrderIndex;
            model.PID        = entity.PID;
            ViewBag.Data_PID = GetSelectList(entity.PID.HasValue ? entity.PID.Value : 0);
            return(View(model));
        }
 public ActionResult PeriodCodeName(int key)
 {
     return(Content(PeriodCateService.Find(key).CateName));
 }