Пример #1
0
        public ActionResult Edit(int ID)
        {
            ArticleCateViewModel model = new ArticleCateViewModel();
            var entity = articleCateService.Find(ID);

            model.CateName   = entity.CateName;
            model.ID         = entity.ID;
            model.Code       = entity.Code;
            model.IsSingle   = entity.IsSingle;
            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));
        }