Ejemplo n.º 1
0
        public bool Create(VInboundAddForm vInbound)
        {
            TInInbound inbound = new TInInbound
            {
                WhId        = vInbound.WhId,
                CustId      = vInbound.CustId,
                BrandId     = vInbound.BrandId,
                BatchNo     = DateTime.Now.ToString("yyyyMMdd"),
                Code        = "RCV" + DateTime.Now.ToString(FormatString.DefaultFormat),
                BizCode     = vInbound.BizCode,
                GoodsType   = vInbound.GoodsType,
                SrcCode     = "Import",
                TransCode   = "Inbound",
                TypeCode    = "RCV",
                Status      = Enum.GetName(typeof(EnumStatus), EnumStatus.None),
                RStatus     = Enum.GetName(typeof(EnumOperateStatus), EnumOperateStatus.Init),
                CreatedBy   = DefaultUser.UserName,
                CreatedTime = DateTime.UtcNow,
            };

            wmsinbound.TInInbounds.Add(inbound);

            return(wmsinbound.SaveChanges() > 0);
        }
Ejemplo n.º 2
0
        public JsonResult Create([FromBody] VInboundAddForm inbound)
        {
            var vInbound = inboundService.Create(inbound);

            return(new JsonResult(vInbound));
        }