示例#1
0
        public void OnGet()
        {
            Order.DeliveryTypes      = BuildTypes();
            Order.CustomerSelectList = _pinhuaContext.GetCustomerSelectList();

            Order.Main.DeliveryId = buildOrderId();
        }
示例#2
0
 public void OnGet()
 {
     DeliveryTypes      = BuildTypes();
     CustomerSelectList = _pinhuaContext.GetCustomerSelectList();
     ContactsSelectList = _pinhuaContext.GetContactsSelectList();
     ContactsList       = _pinhuaContext.往来单位联系人.ToList();
 }
示例#3
0
        public void OnGet(string Id)
        {
            Order.DeliveryTypes      = BuildTypes();
            Order.CustomerSelectList = _pinhuaContext.GetCustomerSelectList();

            Order.Main    = _mapper.Map <RetailGiMain, Gi2MainDTO>(_pinhuaContext.RetailGiMain.AsNoTracking().Where(p => p.DeliveryId == Id).FirstOrDefault());
            Order.Details = _mapper.Map <List <RetailGiDetails>, List <Gi2DetaislDTO> >(_pinhuaContext.RetailGiDetails.AsNoTracking().Where(p => p.DeliveryId == Id).ToList());
        }
示例#4
0
        public void OnGet()
        {
            Order.MovementTypeList = BuildTypes();
            Order.CustomerList     = _pinhuaContext.GetCustomerSelectList();
            Order.WarehouseList    = _pinhuaContext.GetWarehouseSelectList();

            Order.Main.OrderId      = buildOrderId();
            Order.Main.MovementType = "701";
        }
示例#5
0
        public void OnGet()
        {
            Purchasing.PurchasingTypes = buildPurchasingTypes();
            Purchasing.SupplierList    = _pinhuaContext.GetCustomerSelectList();

            Purchasing.Main.PurchasingId = buildPurchasingId();
            Purchasing.Main.CreatedBy    = User.Identity.Name;
            Purchasing.Main.CreatedDate  = DateTime.Now;
        }
示例#6
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());
        }
示例#7
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;
        }
示例#8
0
        public void OnGet(string Id)
        {
            PartnerSelectList = _pinhuaContext.GetCustomerSelectList();

            Order.M = _mapper.Map <生产单, dto生产单M>(_pinhuaContext.生产单.AsNoTracking().Where(p => p.单号 == Id).FirstOrDefault());
            Order.D = _mapper.Map <List <生产单d>, List <dto生产单D> >(_pinhuaContext.生产单d.AsNoTracking().Where(p => p.ExcelServerRcid == Order.M.ExcelServerRcid).ToList());
            foreach (var d in Order.D)
            {
                var casePic = _pinhuaContext.EsCasePic.FirstOrDefault(p => p.PicNo == d.图片);
                if (casePic != null)
                {
                    d.图片base64 = $"data:{d.图片type ?? "image/jpeg"};base64," + Convert.ToBase64String(casePic.Img);
                }
            }
        }
示例#9
0
        public void OnGet(string Id)
        {
            Purchasing.PurchasingTypes = buildPurchasingTypes();
            Purchasing.SupplierList    = _pinhuaContext.GetCustomerSelectList();

            Purchasing.Main    = _mapper.Map <Gr2Main, Gr2MainDto>(_pinhuaContext.Gr2Main.AsNoTracking().Where(p => p.PurchasingId == Id).FirstOrDefault());
            Purchasing.Details = _mapper.Map <List <Gr2Details>, List <Gr2DetailsDto> >(_pinhuaContext.Gr2Details.AsNoTracking().Where(p => p.PurchasingId == Id).ToList());
        }
示例#10
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);
        }
示例#11
0
 public void OnGet()
 {
     PaymentTypeSelectList = _pinhuaContext.GetCollectionTypeSelectList();
     CustomerSelectList    = _pinhuaContext.GetCustomerSelectList();
 }
示例#12
0
 public void OnGet()
 {
     PartnerSelectList = _pinhuaContext.GetCustomerSelectList();
 }
示例#13
0
 public void OnGet(string Id)
 {
     Payment = _pinhuaContext.付款单.AsNoTracking().FirstOrDefault(p => p.付款单号 == Id);
     PaymentTypeSelectList = _pinhuaContext.GetCollectionTypeSelectList();
     CustomerSelectList    = _pinhuaContext.GetCustomerSelectList();
 }