예제 #1
0
        private void fastBarcodes_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == System.Windows.Forms.MouseButtons.Right)
            {
                try
                {
                    if (this.fastBarcodes.SelectedObject != null)
                    {
                        int fillingLineID = 0; int cartonID = 0; int palletID = 0; int batchID = 0;

                        CartonDTO cartonDTO = this.fastBarcodes.SelectedObject as CartonDTO;
                        if (cartonDTO != null)
                        {
                            fillingLineID = cartonDTO.FillingLineID; cartonID = cartonDTO.CartonID;
                        }

                        PalletDTO palletDTO = this.fastBarcodes.SelectedObject as PalletDTO;
                        if (palletDTO != null)
                        {
                            fillingLineID = palletDTO.FillingLineID; palletID = palletDTO.PalletID;
                        }

                        if (fillingLineID > 0)
                        {
                            QuickView quickView = new QuickView(this.scannerAPIs.GetBarcodeList((GlobalVariables.FillingLine)fillingLineID, cartonID, palletID, batchID), (cartonDTO != null ? "Carton: " + cartonDTO.Code : (palletDTO != null ? "Pallet: " + palletDTO.Code : "")));
                            quickView.ShowDialog(); quickView.Dispose();
                        }
                    }
                }
                catch (Exception exception)
                {
                    ExceptionHandlers.ShowExceptionMessageBox(this, exception);
                }
            }
        }
예제 #2
0
        private void fastBatchSumups_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                if (this.fastBatchSumups.SelectedObject != null)
                {
                    BatchSumup batchSumup = this.fastBatchSumups.SelectedObject as BatchSumup;
                    if (batchSumup != null)
                    {
                        IList <BarcodeDTO> barcodeList = new List <BarcodeDTO>();
                        IList <Carton>     cartons     = this.batchAPIs.GetCartonCheckedOuts(batchSumup.BatchID, false);

                        if (cartons.Count > 0)
                        {
                            Mapper.Map <IList <Carton>, IList <BarcodeDTO> >(cartons, barcodeList);

                            QuickView quickView = new QuickView(barcodeList, barcodeList.Count.ToString("N0") + " carton" + (barcodeList.Count > 1 ? "s" : "") + " NOT checked of batch: " + batchSumup.BatchCode);
                            quickView.ShowDialog(); quickView.Dispose();
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                ExceptionHandlers.ShowExceptionMessageBox(this, exception);
            }
        }
예제 #3
0
 private void fastBatchIndex_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         if (this.checkSelectedIndexID())
         {
             //NEED TO REFRESH scannerAPIs
             ScannerAPIs scannerAPIs = new ScannerAPIs(CommonNinject.Kernel.Get <IPackRepository>(), CommonNinject.Kernel.Get <ICartonRepository>(), CommonNinject.Kernel.Get <IPalletRepository>());
             QuickView   quickView   = new QuickView(scannerAPIs.GetBarcodeList((GlobalVariables.FillingLine) this.batchViewModel.FillingLineID, 0, 0, this.baseDTO.GetID()), "Batch: " + this.batchViewModel.Code);
             quickView.ShowDialog(); quickView.Dispose();
         }
     }
     catch (Exception exception)
     {
         ExceptionHandlers.ShowExceptionMessageBox(this, exception);
     }
 }
예제 #4
0
 private void fastBarcodes_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Right)
     {
         try
         {
             if (this.fastBarcodes.SelectedObject != null)
             {
                 CartonDTO cartonDTO = this.fastBarcodes.SelectedObject as CartonDTO;
                 if (cartonDTO != null)
                 {
                     QuickView quickView = new QuickView(this.scannerAPIs.GetBarcodeList((GlobalVariables.FillingLine)cartonDTO.FillingLineID, cartonDTO.CartonID, 0), "Carton: " + cartonDTO.Code);
                     quickView.ShowDialog(); quickView.Dispose();
                 }
             }
         }
         catch (Exception exception)
         {
             ExceptionHandlers.ShowExceptionMessageBox(this, exception);
         }
     }
 }