コード例 #1
0
        public ActionResult Edit(ShippingLineViewModel shippingLineVM)
        {
            //shippingLineVM.Name = User.Identity.Name;

            shippingLineService.Update(shippingLineVM);

            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public void Create(ShippingLineViewModel shippingLineVM)
        {
            var ShippingLine = new ShippingLine
            {
                Name         = shippingLineVM.Name,
                AgentType    = shippingLineVM.AgentType,
                BranchId     = shippingLineVM.BranchId,
                Address      = shippingLineVM.Address,
                PhoneNo      = shippingLineVM.PhoneNo,
                MobileNo     = shippingLineVM.MobileNo,
                FAX          = shippingLineVM.FAX,
                Email        = shippingLineVM.Email,
                Web          = shippingLineVM.Web,
                ModifiedBy   = shippingLineVM.ModifiedBy,
                MidifiedDate = shippingLineVM.MidifiedDate,
                Branch       = shippingLineVM.Branch
            };

            unitOfWork.ShippingLineRepository.Insert(ShippingLine);
            unitOfWork.Save();
        }
コード例 #3
0
 public ActionResult Create(ShippingLineViewModel shippingLineVM)
 {
     shippingLineService.Create(shippingLineVM);
     return(RedirectToAction("Index"));
 }