public ActionResult Edit(string groupId) { IGroupVendorService svc = new GroupVendorService(); var model = svc.Getdata(groupId); return(View("~/Views/Master/GroupVendor/Edit.cshtml", model)); }
public ActionResult Index() { IGroupVendorService svc = new GroupVendorService(); var model = svc.GetAll(); return(View("~/Views/Master/GroupVendor/Index.cshtml", model)); }
public ActionResult Edit(string groupId, GroupingVendorViewModel model) { try { IGroupVendorService svc = new GroupVendorService(); var result = svc.Edit(groupId, model); return(RedirectToAction("Index")); } catch (Exception ex) { general.AddLogError("GroupVendor Edit", ex.Message, ex.StackTrace); return(View("~/Views/Master/GroupVendor/Index.cshtml")); } }
public ActionResult Add(GroupingVendorViewModel model) { try { IGroupVendorService svc = new GroupVendorService(); var result = svc.Add(model); this.AddNotification("Your Data Has Been Successfully Saved. ", NotificationType.SUCCESS); return(RedirectToAction("Index")); } catch (Exception ex) { general.AddLogError("GroupVendor Add", ex.Message, ex.StackTrace); this.AddNotification("ID exist", NotificationType.ERROR); return(View("~/Views/Master/GroupVendor/Add.cshtml")); } }