public Tuple <bool, long, string> Create(VHandOverRequest request) { TOutHandover handover = new TOutHandover(); handover.Code = "HOV" + DateTime.Now.ToString(FormatString.DefaultFormat); handover.WhId = request.WhId; handover.CustId = request.CustId; handover.Store = request.Store.ToString(); handover.CreatedBy = DefaultUser.UserName; handover.CreatedTime = DateTime.UtcNow; handover.Status = Enum.GetName(typeof(EnumOperateStatus), EnumOperateStatus.None); wmsoutbound.TOutHandovers.Add(handover); var r = wmsoutbound.SaveChanges() > 0; return(new Tuple <bool, long, string>(r, handover.Id, "")); }
public JsonResult Create([FromBody] VHandOverRequest handOver) { var result = handoverService.Create(handOver); return(new JsonResult(result)); }