public bool SaveGodown(GodownModel model) { try { GodownMaster master = new GodownMaster { address = model.address, branchId = model.branchId, cityId = model.cityId, godownCode = model.godownCode, godownName = model.godownName, IsActive = true, mobileNo = model.mobileNo, phoneNo = model.phoneNo, pincode = model.pincode, remark = model.remark, stateId = model.stateId, storageCapacity = model.storageCapacity }; _tRSEntities.GodownMasters.Add(master); _tRSEntities.SaveChanges(); return(true); } catch (Exception e) { throw e; } }
public ActionResult EditPartial(GodownMaster godown) { godown.Status = "Active"; godown.ModifiedOn = DateTime.Now; _godownService.UpdateGodown(godown); TempData["GodownList"] = _godownService.GetGodownNames(); return(RedirectToAction("GodownDetails/" + godown.GodownId, "Godown")); }
public ActionResult DeletePartial(GodownMaster Godown) { Godown.Status = "InActive"; Godown.ModifiedOn = DateTime.Now; _godownService.UpdateGodown(Godown); var bnklist = _godownaddresService.GetAllAddressesByCode(Godown.GdCode); foreach (var item in bnklist) { _godownaddresService.UpdateGodown(item); } return(RedirectToAction("GodownDetails/" + Convert.ToInt32(Godown.GodownId), "Godown")); }
public void DeleteGodown(GodownMaster godown) { _godownmasterRepository.Delete(godown); _unitofwork.Commit(); }
public void CreateGodown(GodownMaster godownmaster) { _godownmasterRepository.Add(godownmaster); _unitofwork.Commit(); }