Exemple #1
0
        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));
        }
Exemple #2
0
 private void OnAlertNonDismissableClick()
 {
     AlertService.Add($"Non dismissable info at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Info, 0);
 }
Exemple #3
0
 private void OnAlertDangerAddClick()
 {
     AlertService.Add($"Error at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Danger);
 }
Exemple #4
0
 private void OnAlertSuccessAddClick()
 {
     AlertService.Add($"Success message at: {DateTime.Now}", BBComponents.Enums.BootstrapColors.Success);
 }