Exemplo n.º 1
0
        private void fastBarcodes_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == System.Windows.Forms.MouseButtons.Right)
            {
                try
                {
                    FastObjectListView fastBarcodes = sender as FastObjectListView;
                    if (fastBarcodes.SelectedObject != null)
                    {
                        CartonDTO cartonDTO = null; PalletDTO palletDTO = null;
                        if (sender.Equals(this.fastCartons))
                        {
                            cartonDTO = fastBarcodes.SelectedObject as CartonDTO;
                        }
                        if (sender.Equals(this.fastPallets))
                        {
                            palletDTO = fastBarcodes.SelectedObject as PalletDTO;
                        }

                        if (cartonDTO != null || palletDTO != null)
                        {
                            QuickView quickView = new QuickView(this.scannerAPIs.GetBarcodeList((GlobalVariables.FillingLine)(cartonDTO != null ? cartonDTO.FillingLineID : palletDTO.FillingLineID), cartonDTO != null ? cartonDTO.CartonID : 0, palletDTO != null ? palletDTO.PalletID : 0), cartonDTO != null ? "Carton: " + cartonDTO.Code : "Pallet: " + palletDTO.Code);
                            quickView.ShowDialog(); quickView.Dispose();
                        }
                    }
                }
                catch (Exception exception)
                {
                    ExceptionHandlers.ShowExceptionMessageBox(this, exception);
                }
            }
        }
Exemplo n.º 2
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);
                }
            }
        }
Exemplo n.º 3
0
        public IList <BarcodeDTO> GetBarcodeList(GlobalVariables.FillingLine fillingLineID, int cartonID, int palletID, int batchID)
        {
            try
            {
                IList <BarcodeDTO> barcodeList = new List <BarcodeDTO>();

                if (cartonID > 0)
                {
                    IList <Pack> packs = this.packRepository.GetPacks(fillingLineID, (int)GlobalVariables.BarcodeStatus.Freshnew + "," + (int)GlobalVariables.BarcodeStatus.Readytoset + "," + (int)GlobalVariables.BarcodeStatus.Wrapped, cartonID);
                    if (packs.Count > 0)
                    {
                        packs.Each(pack =>
                        {
                            PackDTO packDTO = Mapper.Map <Pack, PackDTO>(pack);
                            barcodeList.Add(packDTO);
                        });
                    }
                }
                else
                if (palletID > 0)
                {
                    IList <Carton> cartons = this.cartonRepository.GetCartons(fillingLineID, (int)GlobalVariables.BarcodeStatus.Freshnew + "," + (int)GlobalVariables.BarcodeStatus.Readytoset + "," + (int)GlobalVariables.BarcodeStatus.Wrapped + "," + (int)GlobalVariables.BarcodeStatus.Pending + "," + (int)GlobalVariables.BarcodeStatus.Noread, palletID);
                    if (cartons.Count > 0)
                    {
                        cartons.Each(carton =>
                        {
                            CartonDTO cartonDTO = Mapper.Map <Carton, CartonDTO>(carton);
                            barcodeList.Add(cartonDTO);
                        });
                    }
                }
                else
                if (batchID > 0)
                {
                    IList <Pallet> pallets = this.palletRepository.GetPallets(fillingLineID, batchID, (int)GlobalVariables.BarcodeStatus.Freshnew + "," + (int)GlobalVariables.BarcodeStatus.Readytoset + "," + (int)GlobalVariables.BarcodeStatus.Wrapped);
                    if (pallets.Count > 0)
                    {
                        pallets.Each(pallet =>
                        {
                            PalletDTO palletDTO = Mapper.Map <Pallet, PalletDTO>(pallet);
                            barcodeList.Add(palletDTO);
                        });
                    }
                }

                return(barcodeList);
            }
            catch (Exception exception)
            {
                throw exception;
            }
        }
Exemplo n.º 4
0
 private void labelReprintCarton_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.fastCartons.SelectedObject != null)
         {
             CartonDTO cartonDTO = this.fastCartons.SelectedObject as CartonDTO;
             if (cartonDTO != null)
             {
                 GlobalEnums.ReprintCartonID = cartonDTO.CartonID;
                 this.DialogResult           = System.Windows.Forms.DialogResult.Yes;
             }
         }
     }
     catch (Exception exception)
     {
         ExceptionHandlers.ShowExceptionMessageBox(this, exception);
     }
 }
Exemplo n.º 5
0
        public IList <BarcodeDTO> GetCartonAttributes(GlobalVariables.FillingLine fillingLineID, string submitStatusIDs, int?palletID)
        {
            try
            {
                IList <BarcodeDTO>      barcodeList      = new List <BarcodeDTO>();
                IList <CartonAttribute> cartonAttributes = this.cartonRepository.GetCartonAttributes(fillingLineID, submitStatusIDs, palletID);
                if (cartonAttributes.Count > 0)
                {
                    cartonAttributes.Each(cartonAttribute =>
                    {
                        CartonDTO cartonDTO = Mapper.Map <CartonAttribute, CartonDTO>(cartonAttribute);
                        barcodeList.Add(cartonDTO);
                    });
                }

                return(barcodeList);
            }
            catch (Exception exception)
            {
                throw exception;
            }
        }
Exemplo n.º 6
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);
         }
     }
 }