public bool Create(VRnAddForm rnAddForm) { TInRn tRn = new TInRn(); tRn.Code = "RN" + DateTime.Now.ToString(FormatString.DefaultFormat); tRn.BatchNo = rnAddForm.BatchNo ?? DateTime.Now.ToString("yyyyMMdd"); tRn.WhId = rnAddForm.WhId; tRn.CustId = rnAddForm.CustId; tRn.BrandId = rnAddForm.BrandId; tRn.BizCode = rnAddForm.BizCode; tRn.TransCode = "Return"; tRn.GoodsType = rnAddForm.GoodsType; tRn.TypeCode = "RN"; tRn.Courier = rnAddForm.Courier; tRn.TrackingNo = rnAddForm.TrackingNo; tRn.RefCode = rnAddForm.RefCode; tRn.SrcCode = "Import"; tRn.CreatedBy = DefaultUser.UserName; tRn.CreatedTime = DateTime.UtcNow; tRn.Status = "None"; wms.TInRns.Add(tRn); return(wms.SaveChanges() > 0); }
public JsonResult Create([FromBody] VRnAddForm rnAddForm) { var result = rnService.Create(rnAddForm); return(new JsonResult(result)); }