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)); }
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); }