Example #1
0
        private void writeInventoryResult(string[] parameters)
        {
            if (documentId == 0 && !initDocument())
                {
                return;
                }

            if (parameters.Length == 2)
                {
                var succ = Program.AramisSystem.FinishCellInventory(documentId, currentCell.Id, currentCellPallets);
                currentCellPallets.Rows.Clear();
                return;
                }

            var startData = new BarcodeData() { StickerId = Convert.ToInt64(parameters[1]) };
            startData.ReadStickerInfo();

            var resultData = new BarcodeData() { StickerId = startData.StickerId, PreviousStickerCode = Convert.ToInt64(parameters[2]) };
            resultData.Cell.Id = Convert.ToInt64(parameters[0]);

            resultData.Nomenclature.Id = Convert.ToInt32(parameters[7]);
            resultData.Tray.Id = Convert.ToInt64(parameters[4]);
            resultData.Liner.Id = Convert.ToInt64(parameters[5]);
            resultData.LinersAmount = Convert.ToInt32(parameters[6]);

            resultData.TotalUnitsQuantity = Convert.ToInt32(parameters[3]);

            currentCell.Id = resultData.Cell.Id;
            currentCellPallets.Rows.Add(startData.StickerId);

            var movementWriter = new TableMovementWriter(startData, resultData);
            bool result = Program.AramisSystem.WriteInventoryResult(documentId, movementWriter.Table);
        }
Example #2
0
        private void onAnotherStickerScan(BarcodeData barcodeData)
        {
            //if (barcodeData.StickerId == currentBarcodeData.PreviousStickerCode
            //     && !currentBarcodeData.Cell.Empty)
            //    {
            //    notifyCellUpdated();
            //    return;
            //    }

            barcodeData.ReadStickerInfo();
            if (!barcodeData.LocatedInCell)
                {
                showPalletCellNotFountMessage();
                return;
                }

            if (barcodeData.StickerId == currentBarcodeData.PreviousStickerCode
                 && !currentBarcodeData.Cell.Empty
                 && barcodeData.Cell.Id == currentBarcodeData.Cell.Id)
                {
                notifyCellUpdated();
                return;
                }

            if (!string.Format(@"��������� � ������ ""{0}"" ���� ������ � {1}", barcodeData.Cell.Description, barcodeData.StickerId).Ask()) return;

            this.currentBarcodeData.Cell.CopyFrom(barcodeData.Cell);
            this.currentBarcodeData.PreviousStickerCode = barcodeData.StickerId;
            notifyCellUpdated();
        }
Example #3
0
        private void acceptWare(BarcodeData barcodeData)
        {
            barcodeData.ReadStickerInfo();
            var itIsNewPallet = barcodeData.StickerId == newStickerId;
            if (!itIsNewPallet)
                {
                if (barcodeData.Nomenclature.Id != currentWare.Id)
                    {
                    string.Format("Продукция в паллете другая: {0}", barcodeData.Nomenclature.Description).ShowMessage();
                    return;
                    }

                if (barcodeData.Party.Id != currentParty.Id)
                    {
                    string.Format("Дата производства в паллете другая: {0}", barcodeData.Party.Description)
                        .ShowMessage();
                    return;
                    }

                if (barcodeData.Liner.Id > 0 && barcodeData.Liner.Id != currentLiner.Id && !currentLiner.Empty)
                    {
                    string.Format("В указанной паллете используются другой вид прокладок: {0}", barcodeData.Liner.Description)
                        .ShowMessage();
                    return;
                    }

                if (!barcodeData.LocatedInCell)
                    {
                    "Паллеты нет на остатках".ShowMessage();
                    return;
                    }
                currentCell = barcodeData.Cell;
                }

            if (acceptanceId == 0 && !Program.AramisSystem.CreateNewAcceptance(out acceptanceId))
                {
                notifyUserIfConnectionIsBroken();
                return;
                }

            if (!Program.AramisSystem.WriteStickerFact(acceptanceId, barcodeData.StickerId, false,
                            currentCell.Id, previousStickerId, 0, currentLiner.Id, returnWareControls.LinersCountTextBox.GetNumber(),
                            returnWareControls.PacksCountTextBox.GetNumber(), returnWareControls.UnitsCountTextBox.GetNumber()))
                {
                return;
                }

            startNewIdentification();
        }
Example #4
0
        private void handlePalletCode(BarcodeData barcodeData)
        {
            if (!barcodeData.ReadStickerInfo())
                {
                return;
                }

            if (!processedPallets.ContainsKey(barcodeData.StickerId))
                {
                processedPallets.Add(barcodeData.StickerId, true);
                }

            currentNomenclatureLabel.Text = barcodeData.Nomenclature.Description;
            currentStickerIdTextBox.Text = barcodeData.StickerId.ToString();

            updatePrintTask();
        }
Example #5
0
        private void onAnotherStickerScan(BarcodeData barcodeData)
        {
            if (barcodeData.StickerId == finalBarcodeData.PreviousStickerCode) return;

            barcodeData.ReadStickerInfo();
            bool cellFounded = barcodeData.Cell.Id != 0;
            if (!cellFounded)
                {
                "³���������� ������ ���� �� ��������".Warning();
                return;
                }
            onCellScan(barcodeData.Cell, barcodeData.StickerId);
        }