コード例 #1
0
        public ActionResult Detail(int Id = 0)
        {
            GeneralSettingModel generalSettingModel;

            generalSettingService = new GeneralSettingService();
            generalSettingModel   = generalSettingService.GetById(Id);


            return(View(VIEW_DETAIL, generalSettingModel));
        }
コード例 #2
0
        public ActionResult DetailPartial(int Id = 0)
        {
            GeneralSettingModel generalSettingModel;

            generalSettingService = new GeneralSettingService();


            generalSettingModel = generalSettingService.GetById(Id);


            return(PartialView(VIEW_FORM_PARTIAL, generalSettingModel));
        }
コード例 #3
0
        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));
        }