public ActionResult Edit(int Id, SystemMessages obj) { try { // TODO: Add update logic here if (Id > 0 && ModelState.IsValid) { obj.SysMessageID = Id; res = API_SystemMessages.SaveSystemMessages(obj); if (res.Status) { return(RedirectToAction("Index")); } else { res.Data = obj; return(View(res)); } } else { return(View(res)); } } catch { return(View(res)); } }
public ActionResult Create(SystemMessages obj) { try { if (ModelState.IsValid) { // TODO: Add insert logic here res = API_SystemMessages.SaveSystemMessages(obj); if (res.Status) { return(RedirectToAction("Index")); } else { res.Data = obj; return(View(res)); } } else { return(View(res)); } } catch { return(View(res)); } }
public ActionResult SystemMessagesGridPartial() { res1.DataList = API_SystemMessages.GetAllSystemMessages().DataList; if (Session[SessionNames.SystemMessagesLayout] != null) { API_RefOptions.SaveGridLayout(new GridLayout("SystemMessages", 0, (string)Session[SessionNames.SystemMessagesLayout])); } else { Session[SessionNames.SystemMessagesLayout] = API_RefOptions.GetSavedGridLayout("SystemMessages", 0).ToString(); } return(PartialView("_SystemMessagesGridPartial", res1)); }
public ActionResult Edit(int Id) { res = API_SystemMessages.GetSystemMessageDetails(Id); return(View(res)); }
public ActionResult Create() { res = new Response <SystemMessages>(); res = API_SystemMessages.GetSystemMessageDetails(0); return(View(res)); }
public ActionResult Delete(int Id) { res = API_SystemMessages.RemoveSystemMessage(Id); return(RedirectToAction("Index")); }