Beispiel #1
0
        private void fastPendingList_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                FastObjectListView fastPendingList = this.customTabBatch.SelectedIndex == 0 ? this.fastPendingPallets : (this.customTabBatch.SelectedIndex == 1 ? this.fastPendingCartons : null);

                if (this.warehouseAdjustmentViewModel.WarehouseAdjustmentTypeID == (int)GlobalEnums.WarehouseAdjustmentTypeID.ChangeBinLocation && fastPendingList.SelectedObject != null)
                {
                    if (fastPendingList != null && fastPendingList.SelectedObject != null)
                    {
                        GoodsReceiptDetailAvailable goodsReceiptDetailAvailable = (GoodsReceiptDetailAvailable)fastPendingList.SelectedObject;
                        if (goodsReceiptDetailAvailable != null)
                        {
                            LineDetailBinlLocation lineDetailBinlLocation = new LineDetailBinlLocation()
                            {
                                CommodityID     = goodsReceiptDetailAvailable.CommodityID,
                                CommodityCode   = goodsReceiptDetailAvailable.CommodityCode,
                                CommodityName   = goodsReceiptDetailAvailable.CommodityName,
                                PackID          = goodsReceiptDetailAvailable.PackID,
                                PackCode        = goodsReceiptDetailAvailable.PalletCode,
                                CartonID        = goodsReceiptDetailAvailable.CartonID,
                                CartonCode      = goodsReceiptDetailAvailable.CartonCode,
                                PalletID        = goodsReceiptDetailAvailable.PalletID,
                                PalletCode      = goodsReceiptDetailAvailable.PalletCode,
                                WarehouseID     = (int)this.warehouseAdjustmentViewModel.WarehouseReceiptID,
                                BinLocationID   = goodsReceiptDetailAvailable.NewBinLocationID,
                                BinLocationCode = goodsReceiptDetailAvailable.NewBinLocationCode,
                                Quantity        = (decimal)goodsReceiptDetailAvailable.QuantityAvailable,
                                LineVolume      = (decimal)goodsReceiptDetailAvailable.LineVolumeAvailable
                            };

                            Pickups.WizardDetail wizardDetail = new Pickups.WizardDetail(lineDetailBinlLocation);
                            TabletMDI            tabletMDI    = new TabletMDI(wizardDetail);

                            if (tabletMDI.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                            {
                                foreach (var checkedObject in fastPendingList.CheckedObjects)
                                {
                                    GoodsReceiptDetailAvailable p = (GoodsReceiptDetailAvailable)checkedObject;
                                    p.NewBinLocationID   = (int)lineDetailBinlLocation.BinLocationID;
                                    p.NewBinLocationCode = lineDetailBinlLocation.BinLocationCode;
                                }
                                fastPendingList.RefreshObject(goodsReceiptDetailAvailable);
                            }

                            wizardDetail.Dispose(); tabletMDI.Dispose();
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                ExceptionHandlers.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #2
0
        private void timerFlicker_Tick(object sender, EventArgs e)
        {
            var filteredObjects = _listview.FilteredObjects;

            foreach (var filteredObject in filteredObjects)
            {
                _listview.RefreshObject(filteredObject);
            }

            if (_pierceClient != null)
            {
                labelPierceStatus.Text = "PierceClient: " + _pierceClient.Stats;
            }
            if (_strumpServer != null)
            {
                labelStrumpStatus.Text = "StrumpServer: " + _strumpServer.Stats;
            }
        }
Beispiel #3
0
        private void menuOptionBinLocations_Click(object sender, EventArgs e)
        {
            try
            {
                FastObjectListView fastPendingList = this.customTabBatch.SelectedIndex == 0 ? this.fastPendingPallets : (this.customTabBatch.SelectedIndex == 1 ? this.fastPendingCartons : null);

                if (fastPendingList != null && fastPendingList.SelectedObject != null)
                {
                    IPendingforGoodsReceiptDetail pendingforGoodsReceiptDetail = (IPendingforGoodsReceiptDetail)fastPendingList.SelectedObject;
                    if (pendingforGoodsReceiptDetail != null)
                    {
                        LineDetailBinlLocation lineDetailBinlLocation = new LineDetailBinlLocation()
                        {
                            CommodityID     = pendingforGoodsReceiptDetail.CommodityID,
                            CommodityCode   = pendingforGoodsReceiptDetail.CommodityCode,
                            CommodityName   = pendingforGoodsReceiptDetail.CommodityName,
                            PackID          = pendingforGoodsReceiptDetail.PackID,
                            PackCode        = pendingforGoodsReceiptDetail.PackCode,
                            CartonID        = pendingforGoodsReceiptDetail.CartonID,
                            CartonCode      = pendingforGoodsReceiptDetail.CartonCode,
                            PalletID        = pendingforGoodsReceiptDetail.PalletID,
                            PalletCode      = pendingforGoodsReceiptDetail.PalletCode,
                            WarehouseID     = this.goodsReceiptViewModel.WarehouseID,
                            BinLocationID   = pendingforGoodsReceiptDetail.BinLocationID,
                            BinLocationCode = pendingforGoodsReceiptDetail.BinLocationCode,
                            Quantity        = (decimal)pendingforGoodsReceiptDetail.Quantity,
                            LineVolume      = pendingforGoodsReceiptDetail.LineVolume
                        };

                        Pickups.WizardDetail wizardDetail = new Pickups.WizardDetail(lineDetailBinlLocation);
                        TabletMDI            tabletMDI    = new TabletMDI(wizardDetail);

                        if (tabletMDI.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            //if (fastPendingList.Equals(this.fastPendingCartons)) NEU AAP DUNG CACH NAY: CHI CARTON MOI CHO PHEP SET BIN LOCATION HANG LOAT
                            //{
                            foreach (var checkedObject in fastPendingList.CheckedObjects)
                            {
                                IPendingforGoodsReceiptDetail p = (IPendingforGoodsReceiptDetail)checkedObject;
                                p.BinLocationID   = (int)lineDetailBinlLocation.BinLocationID;
                                p.BinLocationCode = lineDetailBinlLocation.BinLocationCode;
                            }
                            //}
                            //else
                            //{
                            //    pendingforGoodsReceiptDetail.BinLocationID = (int)lineDetailBinlLocation.BinLocationID;
                            //    pendingforGoodsReceiptDetail.BinLocationCode = lineDetailBinlLocation.BinLocationCode;
                            //}

                            fastPendingList.RefreshObject(pendingforGoodsReceiptDetail);
                        }

                        wizardDetail.Dispose(); tabletMDI.Dispose();
                    }
                }
            }
            catch (Exception exception)
            {
                ExceptionHandlers.ShowExceptionMessageBox(this, exception);
            }
        }