예제 #1
0
        // GET: Admin/ProService
        public ActionResult ListProService()
        {
            ProServiceModel _proServiceModel = new ProServiceModel();
            _proServiceModel.ProServiceList = _proServiceService.GetAll().ToList();

            return View(_proServiceModel);
        }
예제 #2
0
        public ActionResult ProserviceEdit(ProServiceModel model)
        {
            int id = int.Parse(Request.Form["hfId"]);
            ProService proService = _proServiceService.Find(id);

            proService.Active = model.Active;
            proService.Description = model.Description;
            proService.Order = model.Order;
            proService.Name = model.Name;
            proService.IconClass = model.IconClass;

            _proServiceService.Update(proService);
            _uow.SaveChanges();

            return RedirectToAction("ListProService");
        }
예제 #3
0
        public ActionResult Edit(int id)
        {
            ProService proService = _proServiceService.Find(id);

            ProServiceModel _proServiceModel = new ProServiceModel
            {
                Id = proService.Id,
                Active = proService.Active,
                Description = proService.Description,
                Order = proService.Order,
                Name = proService.Name,
                IconClass = proService.IconClass
            };

            return View(_proServiceModel);
        }
예제 #4
0
        public ActionResult ProServiceAdd(ProServiceModel model)
        {
            ProService proService = new ProService
            {
                Id = model.Id,
                Active = model.Active,
                Description = model.Description,
                Order = model.Order,
                Name = model.Name,
                IconClass = model.IconClass
            };

            _proServiceService.Insert(proService);
            _uow.SaveChanges();

            return RedirectToAction("ListProService");
        }