public string UpdateAppDowntime(DowntimeModel downtimeModel) { try { if (downtimeModel != null) { List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("@FromTime", downtimeModel.FromTime), new KeyValuePair <string, object>("@ToTime", downtimeModel.ToTime), new KeyValuePair <string, object>("@UserId", downtimeModel.UserId), new KeyValuePair <string, object>("@Id", downtimeModel.Id), new KeyValuePair <string, object>("@Message", downtimeModel.Message) }; return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateAppDowntime, param)); } else { return(UtilityConstant.UserResponseStatus.NoDataFromClient); } } catch (Exception ex) { return(UtilityConstant.UserResponseStatus.Error); } }
public ActionResult DeleteDowntime(DowntimeModel model) { if (ModelState.IsValid) { SettingDetails _details = new SettingDetails(); Enums.CrudStatus status = _details.AddDowntime(model, Enums.CrudType.Delete); ReturnAlertMessage(status); } return(RedirectToAction("GetDowntime")); }
public ActionResult SetDowntime([Bind(Exclude = "Id")] DowntimeModel model) { if (ModelState.IsValid) { SettingDetails _details = new SettingDetails(); Enums.CrudStatus status = _details.AddDowntime(model, Enums.CrudType.Insert); ReturnAlertMessage(status); } return(RedirectToAction("GetDowntime")); }