public ActionResult Delete(GstMaster model) { model.Action = "Delete"; model.UserId = UserId; GstMasterService.ManageGstMaster(model); Success("GstMaster deleted successfully.", true); return(RedirectToAction("Index", new { id = model.GstMasterId })); }
public ActionResult Delete(int id) { var model = new GstMaster() { Action = "Get", UserId = UserId, GstMasterId = id }; model = GstMasterService.ManageGstMaster(model).FirstOrDefault(); return(View(model)); }
public ActionResult Edit(GstMaster model, string SelctedPermissionIds) { if (ModelState.IsValid) { model.Action = "Edit"; model.UserId = UserId; GstMasterService.ManageGstMaster(model); Success(string.Format("GstMaster '{0}' updated successfully.", model.GstNumber), true); return(RedirectToAction("Details", new { id = model.GstMasterId })); } return(View(model)); }
public ActionResult Create(GstMaster model) { if (ModelState.IsValid) { model.Action = "Add"; model.UserId = UserId; model.GstMasterId = GstMasterService.ManageGstMaster(model).FirstOrDefault().GstMasterId; Success(string.Format("GstMaster '{0}' created successfully.", model.GstNumber), true); return(RedirectToAction("Details", new { id = model.GstMasterId })); } return(View()); }
public ActionResult Details(int?id) { var model = new GstMaster() { Action = "Get", UserId = UserId, GstMasterId = Convert.ToInt32(id) }; model = GstMasterService.ManageGstMaster(model).FirstOrDefault(); return(View(model)); }
public ActionResult Index(int?page, int?pageSize, int id = 0) { int pageno = 0; pageno = page == null ? 1 : int.Parse(page.ToString()); var model = new GstMaster() { Action = "Get", UserId = UserId, PageNo = pageno, PageSize = pageSize ?? 10 }; return(View(GetData(model))); }
Pager <GstMaster> GetData(GstMaster model) { int totalCount = 0; model.Action = "Get"; model.UserId = UserId; var list = GstMasterService.ManageGstMaster(model); if (model != null && list.Count() > 0) { totalCount = list.First().TotalCount; } Pager <GstMaster> pagedList = new Pager <GstMaster>(list.ToList().AsQueryable(), model.PageNo, model.PageSize, totalCount); return(pagedList); }
public ActionResult Search(GstMaster model) { return(View("Index", GetData(model))); }
public ActionResult Create() { var model = new GstMaster(); return(View(model)); }