Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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"));
 }
Exemplo n.º 3
0
        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"));
        }
Exemplo n.º 4
0
 public void DeleteGodown(GodownMaster godown)
 {
     _godownmasterRepository.Delete(godown);
     _unitofwork.Commit();
 }
Exemplo n.º 5
0
 public void CreateGodown(GodownMaster godownmaster)
 {
     _godownmasterRepository.Add(godownmaster);
     _unitofwork.Commit();
 }