public ActionResult EditETCPAInventoryInput(Entities.ExportTransportation model, string returnUrl = null) { ModelState.Remove("Id"); ViewBag.ReturnUrl = Url.IsLocalUrl(returnUrl) ? returnUrl : Url.RouteUrl("etCPAInventoryInput"); if (!ModelState.IsValid) { return(View(model)); } string flag = "综保区填写核注清单"; if (!String.IsNullOrEmpty(model.LicensePlateNo)) { model.LicensePlateNo = model.LicensePlateNo.Trim(); } if (!String.IsNullOrEmpty(model.NuclearNote)) { model.NuclearNote = model.NuclearNote.Trim(); } if (model.Id.Equals(0)) { } else { model.LicensePlateTime = DateTime.Now; model.LicensePlater = WorkContext.CurrentUser.Id; _exportTransportationService.updateExportTransportation(model); } return(Redirect(ViewBag.ReturnUrl)); }
public ActionResult EditETShippingListCreate(Entities.ExportTransportation model, string returnUrl = null) { ModelState.Remove("Id"); ViewBag.ReturnUrl = Url.IsLocalUrl(returnUrl) ? returnUrl : Url.RouteUrl("etShippingListCreate"); if (!ModelState.IsValid) { return(View(model)); } if (!String.IsNullOrEmpty(model.ItemNo)) { model.ItemNo = model.ItemNo.Trim(); } if (!String.IsNullOrEmpty(model.Project)) { model.Project = model.Project.Trim(); } if (!String.IsNullOrEmpty(model.OfGoods)) { model.OfGoods = model.OfGoods.Trim(); } if (model.Id.Equals(0)) { } else { model.CreationTime = DateTime.Now; model.Creator = WorkContext.CurrentUser.Id; _exportTransportationService.updateExportTransportation(model); } return(Redirect(ViewBag.ReturnUrl)); }
public void updateExportTransportation(Entities.ExportTransportation model) { var item = _exportTransportationRepository.getById(model.Id); if (item == null) { return; } item.Project = model.Project; item.OfGoods = model.OfGoods; item.TotalGw = model.TotalGw; item.TotalNo = model.TotalNo; item.TradeTerms = model.TradeTerms; item.Carrier = model.Carrier; item.PickDriver = model.PickDriver; item.DriverCard = model.DriverCard; item.DeliverySituation = model.DeliverySituation; item.PaymentMethod = model.PaymentMethod; item.ImportItem = model.ImportItem; item.Applier = model.Applier; item.ApplyTime = model.ApplyTime; item.ItemNo = model.ItemNo; item.LicensePlateNo = model.LicensePlateNo; item.NuclearNote = model.NuclearNote; item.ManufactureDate = model.ManufactureDate; item.LicensePlater = model.LicensePlater; item.LicensePlateTime = model.LicensePlateTime; _exportTransportationRepository.update(item); _memoryCache.Remove(MODEL_KEY); }
public ActionResult EditETShippingApplicationInput(Entities.ExportTransportation model, string returnUrl = null) { ModelState.Remove("Id"); ViewBag.ReturnUrl = Url.IsLocalUrl(returnUrl) ? returnUrl : Url.RouteUrl("etShippingApplicationInput"); if (!ModelState.IsValid) { return(View(model)); } string flag = "出口运输申请"; if (!String.IsNullOrEmpty(model.PaymentMethod)) { model.PaymentMethod = model.PaymentMethod.Trim(); } if (!String.IsNullOrEmpty(model.ImportItem)) { model.ImportItem = model.ImportItem.Trim(); } if (model.Id.Equals(0)) { model.ApplyTime = DateTime.Now; model.Applier = WorkContext.CurrentUser.Account; _exportTransportationService.insertExportTransportation(model); } else { _exportTransportationService.updateExportTransportation(model); } return(Redirect(ViewBag.ReturnUrl)); }
public void insertExportTransportation(Entities.ExportTransportation model) { _exportTransportationRepository.insert(model); _memoryCache.Remove(MODEL_KEY); }