Example #1
0
 public ActionResult UpdateBreakInformation(ModelBreakInformation model)
 {
     if (_IMasterCategory.Admin_BreakInformationCheckExists(model.BreakInformationId, model.BreakType).Count > 0)
     {
         model.ErrorMessage = "Break name already existed";
     }
     else
     {
         _IMasterCategory.Admin_MasterBreakInfoUpdate(model.BreakInformationId, model.BreakType, model.StartTime,
                                                      model.MinimumTime, model.Display, model.EndTime);
         Response.Redirect("ManageBreakInformation");
     }
     return(View(model));
 }
Example #2
0
        public ActionResult UpdateBreakInformation(int breakInformationId)
        {
            ModelBreakInformation model = new ModelBreakInformation();

            if (breakInformationId > 0)
            {
                var result = _IGetListValues.GetBreakInformation().FirstOrDefault(x => x.BreakInformationId == breakInformationId);
                model.BreakInformationId = result.BreakInformationId;
                model.BreakType          = result.BreakType;
                model.Display            = result.Display;
                model.EndTime            = result.EndTime;
                model.MinimumTime        = result.MinimumTime;
                model.StartTime          = result.StartTime;
            }
            return(View(model));
        }