Beispiel #1
0
        public ActionResult Update([ModelBinder(typeof(DevExpressEditorsBinder))]  AlertModel alertModel)
        {
            alertModel._UserId = (int)Session["userId"];

            alertService         = new AlertService();
            alertModel._FormMode = FormModeEnum.Edit;



            if (ModelState.IsValid)
            {
                alertService.Update(alertModel);
                alertModel = alertService.GetById(alertModel.Id);
            }
            else
            {
                string message = GetErrorModel();

                throw new Exception(string.Format("[VALIDATION] {0}", message));
            }

            return(PartialView(VIEW_FORM_PARTIAL, alertModel));
        }