示例#1
0
        public static EmployeeAlert SetAlert(EmployyeAlerts alert, string txt)
        {
            var model = new EmployeeAlert();

            switch (alert)
            {
            case EmployyeAlerts.Succes:
                model.Alert = "alert-success";
                break;

            case EmployyeAlerts.Danger:
                model.Alert = "alert-danger";
                break;

            case EmployyeAlerts.Info:
                model.Alert = "alert-info";
                break;

            case EmployyeAlerts.Warning:
                model.Alert = "alert-warning";
                break;
            }

            model.Message = txt;

            return(model);
        }
示例#2
0
        public static EmployeeAlert SetAlert(EmployyeAlerts alert, string txt)
        {
            var model = new EmployeeAlert();

            switch(alert)
            {
                case EmployyeAlerts.Succes:
                    model.Alert = "alert-success";
                    break;
                case EmployyeAlerts.Danger:
                    model.Alert = "alert-danger";
                    break;
                case EmployyeAlerts.Info:
                    model.Alert = "alert-info";
                    break;
                case EmployyeAlerts.Warning:
                    model.Alert = "alert-warning";
                    break;
            }

            model.Message = txt;

            return model;
        }