public void OnGet()
        {
            Order.MovementTypeList = BuildTypes();
            Order.CustomerList     = _pinhuaContext.GetCustomerSelectList();
            Order.WarehouseList    = _pinhuaContext.GetWarehouseSelectList();

            Order.Main.OrderId      = buildOrderId();
            Order.Main.MovementType = "701";
        }
Beispiel #2
0
        public void OnGet(string Id)
        {
            Order.MovementTypeList = BuildTypes();
            Order.CustomerList     = _pinhuaContext.GetCustomerSelectList();
            Order.WarehouseList    = _pinhuaContext.GetWarehouseSelectList();

            Order.Main    = _mapper.Map <StockOutMain, StockOutMainDTO>(_pinhuaContext.StockOutMain.AsNoTracking().Where(p => p.OrderId == Id).FirstOrDefault());
            Order.Details = _mapper.Map <List <StockOutDetails>, List <StockOutDetailsDTO> >(_pinhuaContext.StockOutDetails.AsNoTracking().Where(p => p.OrderId == Id).ToList());
        }
Beispiel #3
0
        public void OnGet()
        {
            Order.MovementTypeList = BuildTypes();
            Order.CustomerList     = _pinhuaContext.GetCustomerSelectList();
            Order.WarehouseList    = _pinhuaContext.GetWarehouseSelectList();

            Order.Main.OrderId      = buildOrderId();
            Order.Main.MovementType = "131";
            Order.Main.CreatedBy    = User.Identity.Name;
            Order.Main.CreatedDate  = DateTime.Now;
        }
Beispiel #4
0
        public void OnGet(string Id)
        {
            Order.MovementTypeList = BuildTypes();
            Order.CustomerList     = _pinhuaContext.GetCustomerSelectList();
            Order.WarehouseList    = _pinhuaContext.GetWarehouseSelectList();

            Order.Main = _mapper.Map <StockSubconctractingMain, StockSubconctractingMainDTO>(_pinhuaContext.StockSubconctractingMain.AsNoTracking().Where(p => p.OrderId == Id).FirstOrDefault());
            //Order.Details = _mapper.Map<List<StockSubconctractingDetails>, List<StockSubconctractingDetailsDTO>>(_pinhuaContext.StockSubconctractingDetails.AsNoTracking().Where(p => p.OrderId == Id).ToList());
            var details = (from d in _pinhuaContext.StockSubconctractingDetails.AsNoTracking().Where(p => p.OrderId == Id)
                           join product in _pinhuaContext.ProductRegistrationMain.AsNoTracking() on new { d.ModelNumber, SubModelNumber = d.SubModelNumber.Value } equals new { product.ModelNumber, product.SubModelNumber }
                           join model in _pinhuaContext.产品型号清单.AsNoTracking() on product.ModelNumber equals model.编号
                           select new StockSubconctractingDetails
            {
                Id = d.Id,
                Description = product.Description,
                SubModelNumber = product.SubModelNumber,
                ModelNumber = product.ModelNumber,
                ModelName = model.称,
                Amount = d.Amount,
                Specification = d.Specification,
                Height = d.Height,
                Length = d.Length,
                Width = d.Width,
                OrderId = d.OrderId,
                Price = d.Price,
                Qty = d.Qty,
                Remarks = d.Remarks,
                Unit = d.Unit,
                UnitQty = d.UnitQty,
                ExcelServerRcid = d.ExcelServerRcid,
                ExcelServerRtid = d.ExcelServerRtid,
                ExcelServerChg = d.ExcelServerChg,
                ExcelServerCn = d.ExcelServerCn,
                ExcelServerRc1 = d.ExcelServerRc1,
                ExcelServerRn = d.ExcelServerRn,
                ExcelServerWiid = d.ExcelServerWiid
            }).ToList();

            Order.Details = _mapper.Map <List <StockSubconctractingDetails>, List <StockSubconctractingDetailsDTO> >(details);
        }