public ActionResult Detail(int Id = 0) { GeneralSettingModel generalSettingModel; generalSettingService = new GeneralSettingService(); generalSettingModel = generalSettingService.GetById(Id); return(View(VIEW_DETAIL, generalSettingModel)); }
public ActionResult DetailPartial(int Id = 0) { GeneralSettingModel generalSettingModel; generalSettingService = new GeneralSettingService(); generalSettingModel = generalSettingService.GetById(Id); return(PartialView(VIEW_FORM_PARTIAL, generalSettingModel)); }
public ActionResult Update([ModelBinder(typeof(DevExpressEditorsBinder))] GeneralSettingModel generalSettingModel) { generalSettingModel._UserId = (int)Session["userId"]; generalSettingService = new GeneralSettingService(); if (ModelState.IsValid) { generalSettingService.Update(generalSettingModel); generalSettingModel = generalSettingService.GetById(generalSettingModel.Id); } else { string message = GetErrorModel(); throw new Exception(string.Format("[VALIDATION] {0}", message)); } return(PartialView(VIEW_FORM_PARTIAL, generalSettingModel)); }