public ActionResult Add([ModelBinder(typeof(DevExpressEditorsBinder))] AlertModel alertModel) { alertModel._UserId = (int)Session["userId"]; alertService = new AlertService(); if (ModelState.IsValid) { alertService.Add(alertModel); alertModel = alertService.GetNewModel(); } else { string message = GetErrorModel(); throw new Exception(string.Format("[VALIDATION] {0}", message)); } alertModel._FormMode = Models.FormModeEnum.New; return(PartialView(VIEW_FORM_PARTIAL, alertModel)); }
private void OnAlertNonDismissableClick() { AlertService.Add($"Non dismissable info at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Info, 0); }
private void OnAlertDangerAddClick() { AlertService.Add($"Error at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Danger); }
private void OnAlertSuccessAddClick() { AlertService.Add($"Success message at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Success); }