예제 #1
0
        /// <summary>
        /// 生成选中项的值和描述
        /// </summary>
        void GenerateSelectedValueAndText()
        {
            SelectedGridList = new List <PickPartsQueryUIModel>();
            foreach (var loopSourceItem in ListGridDS)
            {
                if (!loopSourceItem.IsChecked)
                {
                    continue;
                }
                PickPartsQueryUIModel argsPickPartsQuery = new PickPartsQueryUIModel
                {
                    INV_ID                = loopSourceItem.INV_ID,
                    INV_Org_ID            = loopSourceItem.INV_Org_ID,
                    INV_SUPP_ID           = loopSourceItem.INV_SUPP_ID,
                    INV_WH_ID             = loopSourceItem.INV_WH_ID,
                    INV_WHB_ID            = loopSourceItem.INV_WHB_ID,
                    INV_ThirdNo           = loopSourceItem.INV_ThirdNo,
                    INV_OEMNo             = loopSourceItem.INV_OEMNo,
                    INV_Barcode           = loopSourceItem.INV_Barcode,
                    INV_BatchNo           = loopSourceItem.INV_BatchNo,
                    INV_Name              = loopSourceItem.INV_Name,
                    INV_Specification     = loopSourceItem.INV_Specification,
                    INV_Qty               = loopSourceItem.INV_Qty,
                    INV_PurchaseUnitPrice = loopSourceItem.INV_PurchaseUnitPrice,
                    INV_IsValid           = loopSourceItem.INV_IsValid,
                    INV_CreatedBy         = loopSourceItem.INV_CreatedBy,
                    INV_CreatedTime       = loopSourceItem.INV_CreatedTime,
                    INV_UpdatedBy         = loopSourceItem.INV_UpdatedBy,
                    INV_UpdatedTime       = loopSourceItem.INV_UpdatedTime,

                    APA_Brand                  = loopSourceItem.APA_Brand,
                    APA_UOM                    = loopSourceItem.APA_UOM,
                    APA_Level                  = loopSourceItem.APA_Level,
                    APA_VehicleBrand           = loopSourceItem.APA_VehicleBrand,
                    APA_VehicleInspire         = loopSourceItem.APA_VehicleInspire,
                    APA_VehicleCapacity        = loopSourceItem.APA_VehicleCapacity,
                    APA_VehicleYearModel       = loopSourceItem.APA_VehicleYearModel,
                    APA_VehicleGearboxTypeName = loopSourceItem.APA_VehicleGearboxTypeName,
                    APA_VehicleGearboxTypeCode = loopSourceItem.APA_VehicleGearboxTypeCode,

                    Org_ShortName = loopSourceItem.Org_ShortName,
                    SUPP_Name     = loopSourceItem.SUPP_Name,
                    WH_Name       = loopSourceItem.WH_Name,
                    WHB_Name      = loopSourceItem.WHB_Name,

                    APN_FixUOM      = loopSourceItem.APN_FixUOM,
                    QtyFormatString = loopSourceItem.QtyFormatString,
                };

                SelectedGridList.Add(argsPickPartsQuery);
            }
        }
예제 #2
0
        /// <summary>
        /// Grid单击单元格事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gdGrid_ClickCell(object sender, ClickCellEventArgs e)
        {
            var curActiveRow = gdGrid.Rows[e.Cell.Row.Index];

            if (curActiveRow != null)
            {
                //当前领料明细
                _curInventory = ListGridDS.FirstOrDefault(x => x.INV_Barcode == curActiveRow.Cells[SystemTableColumnEnums.PIS_Inventory.Code.INV_Barcode].Value.ToString());
            }

            //加载配件图片
            LoadAutoPartsPicture(_curInventory);

            //展开【配件图片】GroupBox
            gbPicture.Expanded = true;
        }
예제 #3
0
        /// <summary>
        /// 加载配件图片
        /// </summary>
        private void LoadAutoPartsPicture(PickPartsQueryUIModel paramInventory)
        {
            if (paramInventory == null ||
                string.IsNullOrEmpty(paramInventory.INV_Barcode) ||
                paramInventory.INV_Barcode == _latestBarcode)
            {
                return;
            }
            _latestBarcode = paramInventory.INV_Barcode;

            //查询配件图片
            _bll.QueryForList(new MDLPIS_InventoryPicture
            {
                WHERE_INVP_Barcode = paramInventory.INV_Barcode,
                WHERE_INVP_IsValid = true,
            }, _autoPartsPictureList);

            flowLayoutPanelPicture.Controls.Clear();
            _pictureExpandList.Clear();

            if (_autoPartsPictureList.Count > 0)
            {
                //配件有图片时,加载实际数量的扩展的图片控件以及图片
                foreach (var loopPicture in _autoPartsPictureList)
                {
                    if (string.IsNullOrEmpty(loopPicture.INVP_ID) ||
                        string.IsNullOrEmpty(loopPicture.INVP_PictureName))
                    {
                        continue;
                    }

                    Dictionary <string, AutoPartsPictureUIModel> pictureDictionary = new Dictionary <string, AutoPartsPictureUIModel>();
                    if (!pictureDictionary.ContainsKey(loopPicture.INVP_PictureName))
                    {
                        pictureDictionary.Add(loopPicture.INVP_PictureName, loopPicture);
                    }
                    ThreadPool.QueueUserWorkItem(new WaitCallback(LoadImage), pictureDictionary);
                }
            }
        }