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