Exemplo n.º 1
0
        private void createDateTimeControls()
        {
            MobileTextBox day   = (MobileTextBox)MainProcess.CreateTextBox(50, 150, 25, string.Empty, ControlsStyle.LabelLarge, false);
            MobileControl dot1  = MainProcess.CreateLabel(".", 80, 150, 5, MobileFontSize.Large, FontStyle.Bold);
            MobileControl month = MainProcess.CreateTextBox(90, 150, 25, string.Empty, ControlsStyle.LabelLarge, false);
            MobileControl dot2  = MainProcess.CreateLabel(".", 120, 150, 5, MobileFontSize.Large, FontStyle.Bold);
            MobileControl year  = MainProcess.CreateTextBox(130, 150, 50, string.Empty, ControlsStyle.LabelLarge, false);

            day.Focus();

            //сохранить нужно как: MM-dd-yyyy, а отображать: dd-MM-yyyy
            controls.Add(month);
            controls.Add(dot1);
            controls.Add(day);
            controls.Add(dot2);
            controls.Add(year);

            TextBox dayBox   = (TextBox)day.GetControl();
            TextBox monthBox = (TextBox)month.GetControl();
            TextBox yearBox  = (TextBox)year.GetControl();

            //dayBox.MaxLength = 2;
            dayBox.TextChanged += ValueEditor_TextChanged;
            //monthBox.MaxLength = 2;
            monthBox.TextChanged += ValueEditor_TextChanged2;
            //yearBox.MaxLength = 2;
            yearBox.TextChanged += ValueEditor_TextChanged3;
        }
Exemplo n.º 2
0
        private void createPalletControls()
        {
            palletEditControls = new AcceptancePalletControls();
            int top = 42;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.nomenclatureLabel = MainProcess.CreateLabel("<номенклатура>", 10, top, 230,
                                                                           MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.stickerIdInfoLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                            MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.cellCaptionLabel = MainProcess.CreateLabel("Комірка:", 10, top, 80,
                                                                          MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            palletEditControls.cellLabel = MainProcess.CreateLabel("<?>", 95, top, 140,
                                                                   MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.previousPalletStickerInfoLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                                        MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            palletEditControls.nextCommandLabel1 = MainProcess.CreateLabel("Відскануйте нову", 10, 190, 230,
                                                                           MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            palletEditControls.nextCommandLabel2 = MainProcess.CreateLabel("адресу", 10, 220, 230,
                                                                           MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
        }
Exemplo n.º 3
0
        public override sealed void DrawControls()
        {
            if (isLoading)
            {
                int tableHeight = 230;

                selectedInfo = MainProcess.CreateLabel(
                    "<не обрано>", 0, 60, 240, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info);
                visualTable    = MainProcess.CreateTable("Table", tableHeight, 85);
                visualTable.DT = sourceTable;
                visualTable.OnChangeSelectedRow += visualTable_OnChangeSelectedRow;
                visualTable.AddColumn(headerOfDescriptionColumn, DESCRIPTION_COLUMN, 194);
                visualTable.AddColumn(string.Empty, VALUE_COLUMN, 20);
                visualTable.OnRowSelected += visualTable_OnRowSelected;
                if (listOfElements != null)
                {
                    foreach (TableData element in listOfElements)
                    {
                        visualTable.AddRow(element.Description, element.Value, element.Id);
                    }
                }

                visualTable.Focus();
            }
        }
Exemplo n.º 4
0
        public override sealed void DrawControls()
        {
            int top = 42;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("Відскануйте піддон", 10, top, 230,
                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            currentNomenclatureLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                               MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            MainProcess.CreateLabel("Код палети", 10, top, 100,
                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            currentStickerIdTextBox = MainProcess.CreateTextBox(120, top, 80, string.Empty, ControlsStyle.LabelNormal, palletCodeEntered, false);

            top           += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 3;
            printTaskLabel = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                     MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top           += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2;
            complateButton = MainProcess.CreateButton("Роздрукувати     (F4)", 5, top, 230, 35, string.Empty, complateProcess);

            updatePrintTask();
        }
Exemplo n.º 5
0
        private void createAddressIdentificationStepControls()
        {
            addressIdentificationControls = new AddressIdentificationControls();
            int top = 80;

            addressIdentificationControls.ScannCellLabel1 = MainProcess.CreateLabel("Сканируйте", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            addressIdentificationControls.ScannCellLabel2 = MainProcess.CreateLabel("предыдущую", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            addressIdentificationControls.ScannCellLabel3 = MainProcess.CreateLabel("паллету или ячейку", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            addressIdentificationControls.ScannCellLabel4 = MainProcess.CreateLabel("для размещения", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            addressIdentificationControls.ScannCellLabel5 = MainProcess.CreateLabel("новой", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            addressIdentificationControls.ScannCellLabel6 = MainProcess.CreateLabel("паллеты", 5, top, 230,
                                                                                    MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);
        }
Exemplo n.º 6
0
        public override void DrawControls()
        {
            switch (processStep)
            {
            case Steps.DocumentSelecting:
            {
                #region Выбор документа

                //PerformQuery("ПолучитьСписокПланаПриходаТары");
                //if (Parameters == null || Parameters[0] == null)
                //{
                //    ShowMessage("Подойдите в зону беспроводного покрытия");
                //    MainProcess.Process = new SelectingProcess(MainProcess);
                //    return;
                //}

                //dataTable = Parameters[0] as DataTable;
                //if (dataTable.Rows.Count == 0)
                //{
                //    ShowMessage("Нет запланированных документов для приема расходных материалов!");
                //    MainProcess.Process = new SelectingProcess(MainProcess);
                //    return;
                //}

                TableControl = MainProcess.CreateTable("WareList", 259);
                TableControl.OnKeyPressedEvent = OnDataGridViewKeyPress;
                docsVisual = TableControl.GetControl() as DataGrid;
                MainProcess.ToDoCommand = "Выберите документ";



                break;
                #endregion
            }

            case Steps.Incoming:
            {
                #region Пересчет расходных материалов

                MainProcess.ClearControls();

                nomenclatureLabel = MainProcess.CreateLabel("<Ожидается код>", 19, 59, 215, ControlsStyle.LabelNormal).GetControl() as Label;
                MainProcess.CreateLabel("Запланировано:", 19, 93, 201, ControlsStyle.LabelNormal);
                planLabel = MainProcess.CreateLabel("0 / 0", 19, 120, 201, ControlsStyle.LabelRedRightAllign).GetControl() as Label;
                MainProcess.CreateLabel("Принято:", 19, 150, 201, ControlsStyle.LabelNormal);
                realLabel            = MainProcess.CreateLabel("0 / 0", 19, 177, 201, ControlsStyle.LabelRedRightAllign).GetControl() as Label;
                actedLabel           = MainProcess.CreateLabel("Количество брака:", 19, 228, 201, ControlsStyle.LabelNormal).GetControl() as Label;
                actedTextBox         = MainProcess.CreateTextBox(136, 262, 81, "", ControlsStyle.LabelRedRightAllign, OnEnterToActTextbox, false).GetControl() as TextBox;
                uniqueCodeLabel      = MainProcess.CreateLabel("Отмена - Esc", 19, 290, 201, ControlsStyle.LabelNormal).GetControl() as Label;
                actedLabel.Visible   = false;
                actedTextBox.Visible = false;

                MainProcess.ToDoCommand = "ПРИЕМ РАСХ. МАТЕРИАЛОВ";
                break;

                #endregion
            }
            }
        }
Exemplo n.º 7
0
        private void DrawForm2Controls()
        {
            MainProcess.CreateLabel("Прийнято шт.:", 8, 70, 136, ControlsStyle.LabelNormal);

            acceptedLabel = (MobileLabel)MainProcess.CreateLabel("0", 144, 70, 60, ControlsStyle.LabelNormal);

            lastBarcodeLabel = (MobileLabel)MainProcess.CreateLabel("", 20, 150, 150, ControlsStyle.LabelLarge);
        }
Exemplo n.º 8
0
 public override void DrawControls()
 {
     MainProcess.ToDoCommand = "Оберіть процес";
     MainProcess.CreateButton("Інфо", 20, 75, 200, 45, "info", info_Click);
     MainProcess.CreateButton("Процеси", 20, 150, 200, 45, "process", process_Click);
     MainProcess.CreateButton("Реєстрація", 20, 225, 200, 45, "registration", registration_Click);
     MainProcess.CreateLabel("Синхронізація - F5", 25, 280, 230, MobileFontSize.Large);
 }
Exemplo n.º 9
0
        public override void DrawControls()
        {
            MainProcess.ClearControls();

            MainProcess.CreateLabel("Синхронізація!", 5, 125, 230, MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold);
            MainProcess.CreateLabel("Зараз оновлюється:", 5, 155, 230, MobileFontSize.Normal, MobileFontPosition.Center);
            infoLabel = MainProcess.CreateLabel(string.Empty, 5, 175, 230, MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);
        }
Exemplo n.º 10
0
        private void createScanPalletLabelControls()
        {
            scanNextPalletControls = new ScanPalletControls();

            int top = 140;

            scanNextPalletControls.WillLabel = MainProcess.CreateLabel("Відскануйте палету", 10, top, 230,
                                                                       MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
        }
Exemplo n.º 11
0
 private void drawScanForm(string accessoryStr)
 {
     MainProcess.ClearControls();
     MainProcess.ToDoCommand = TOPIC_OF_PROCESS;
     MainProcess.CreateLabel("Відскануте штрих код", 5, 150, 230,
                             MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default);
     MainProcess.CreateLabel(accessoryStr, 5, 185, 230,
                             MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info);
 }
Exemplo n.º 12
0
        public override void DrawControls()
        {
            MainProcess.CreateLabel("Увійдіть до системи", 19, 165, 211, MobileFontSize.Large);
            MainProcess.ToDoCommand = "Регістрація";

            MainProcess.CreateButton("Створити відвантаження", 10, 205, 220, 35, "", createShipment);

            MainProcess.CreateButton("Вхід", 10, 275, 220, 35, "Вхід", startSelectingProcess);
        }
Exemplo n.º 13
0
        public override sealed void DrawControls()
        {
            int top = 42;


            top       = 230;
            taskLabel = MainProcess.CreateLabel("Скануйте палету", 10, top, 220,
                                                MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Warning, FontStyle.Bold);
        }
Exemplo n.º 14
0
 private void drawFinishForm()
 {
     MainProcess.ClearControls();
     MainProcess.ToDoCommand = TOPIC_OF_PROCESS;
     MainProcess.CreateLabel("Світильник розібрано!", 5, 150, 230,
                             MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default);
     MainProcess.CreateLabel("Зберегти дані?", 5, 185, 230,
                             MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info);
     MainProcess.CreateButton("Ок", 10, 275, 105, 35, "ok", Save_click);
     MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click);
 }
Exemplo n.º 15
0
        public override void DrawControls()
        {
            pickingTask = new PickingTaskControls();

            int top = 42;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            pickingTask.planPickingCell = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                  MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            pickingTask.pickingWareLine1 = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                   MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS - 7;
            pickingTask.pickingWareLine2 = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                   MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            pickingTask.productionDate = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                 MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            pickingTask.planedQuantity = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                 MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            scanPallet = new ScanPallet();

            scanPallet.order = MainProcess.CreateLabel("Відскануйте палету", 10, 240, 230,
                                                       MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            quantityEditControls = new QuantityEditControls();

            top = 205;
            quantityEditControls.boxesLabel = MainProcess.CreateLabel("Відібрано упаковок", 10, top, 150,
                                                                      MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            quantityEditControls.packsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            quantityEditControls.unitsLabel = MainProcess.CreateLabel("Відібрано одиниць", 10, top, 150,
                                                                      MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            quantityEditControls.unitsCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            quantityEditControls.linersLabel = MainProcess.CreateLabel("Знято прокладок", 10, top, 150,
                                                                       MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            quantityEditControls.linersCountTextBox = MainProcess.CreateTextBox(170, top, 55, string.Empty, ControlsStyle.LabelNormal, null, false);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            quantityEditControls.proceedButton = MainProcess.CreateButton("Продовжити              ( F5 )", 10, top, 220, 30, "modelButton", proceed);
        }
Exemplo n.º 16
0
        public override sealed void DrawControls()
        {
            if (IsLoad)
            {
                object idObj = getAcceptanceDoc();

                if (idObj != null)
                {
                    documentId = idObj;
                    acceptanceDoc.Read <AcceptanceOfNewComponents>(documentId);

                    string caseModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.CaseModel);
                    string lampModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.LampModel);
                    string unitModel = CatalogObject.GetDescription(typeof(Models).Name, acceptanceDoc.UnitModel);

                    caseModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.CaseModel);
                    lampModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.LampModel);
                    unitModelRef = CatalogObject.GetSyncRef(typeof(Models).Name, acceptanceDoc.UnitModel);

                    if (acceptanceDoc.CaseModel == 0)
                    {
                        selectedModelRef = acceptanceDoc.LampModel == 0
                                              ? unitModelRef
                                              : lampModelRef;
                    }
                    else
                    {
                        selectedModelRef = caseModelRef;
                    }
                    const string emptyModel = "-";
                    MainProcess.CreateLabel(
                        string.Concat("Корпус: ", string.IsNullOrEmpty(caseModel) ? emptyModel : caseModel)
                        , 5, 95, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default);
                    MainProcess.CreateLabel(
                        string.Concat("Лампа: ", string.IsNullOrEmpty(lampModel) ? emptyModel : lampModel)
                        , 5, 130, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default);
                    MainProcess.CreateLabel(
                        string.Concat("Блок: ", string.IsNullOrEmpty(unitModel) ? emptyModel : unitModel)
                        , 5, 165, 230, MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default);
                    labelOfCount = MainProcess.CreateLabel("0", 0, 215, 240, MobileFontSize.Large,
                                                           MobileFontPosition.Center, MobileFontColors.Info);
                    MainProcess.CreateButton("Завершити приймання", 15, 275, 210, 35, "ok", ok_Click);
                }
                else
                {
                    MainProcess.CreateLabel(
                        "Не знайдено жодного відкритого документа \"Прийомка нового комплектуючого\" для обраного типу!",
                        5, 115, 230, 150, MobileFontSize.Multiline, MobileFontPosition.Center, MobileFontColors.Warning, FontStyle.Bold);
                }
            }
        }
Exemplo n.º 17
0
        private void createScanPalletLabelControls()
        {
            scanNextPalletControls = new ScanPalletControls();

            int top = 120;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            scanNextPalletControls.WillLabel = MainProcess.CreateLabel("Відскануйте палету", 10, top, 230,
                                                                       MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS * 2;
            scanNextPalletControls.FinishCellButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 55, "modelButton", () => finishCell());
        }
Exemplo n.º 18
0
        public override sealed void DrawControls()
        {
            MainProcess.ToDoCommand = "Вкажіть місце";

            MainProcess.CreateButton("Карта", 15, 80, 100, 35, "map", selectMap);
            registerBtn = MainProcess.CreateButton("Регістр", 15, 125, 100, 35, "register", selectRegister, null, null, false);
            positionBtn = MainProcess.CreateButton("Позиція", 15, 170, 100, 35, "position", selectPostition, null, null, false);

            mapLabel      = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 90, 100, MobileFontSize.Normal, MobileFontPosition.Center);
            registerLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 135, 100, MobileFontSize.Normal, MobileFontPosition.Center);
            positionLabel = MainProcess.CreateLabel(NOT_CHOOSEN, 120, 180, 100, MobileFontSize.Normal, MobileFontPosition.Center);

            MainProcess.CreateButton("Заповнити як попередній", 20, 230, 200, 35, "fillLikePrev", fillLikePrev);
            MainProcess.CreateButton("Ok", 20, 275, 200, 35, "ok", Ok);
        }
Exemplo n.º 19
0
        private void DrawForm1Controls()
        {
            mapDescription = getMapDescription(map);
            if (string.IsNullOrEmpty(mapDescription))
            {
                MainProcess.Process = new SelectingLampProcess(MainProcess);
                return;
            }

            MainProcess.CreateLabel(string.Format("Карта {0}", mapDescription), 10, 70, 160, ControlsStyle.LabelLarge);
            MainProcess.CreateLabel(string.Format("Регістр {0}", register), 10, 105, 160, ControlsStyle.LabelLarge);
            MainProcess.CreateLabel(string.Format("Позиція {0}", position), 10, 140, 160, ControlsStyle.LabelLarge);

            MainProcess.CreateLabel("Скануйте світильник", 10, 220, 230, ControlsStyle.LabelLarge);
        }
Exemplo n.º 20
0
        public override sealed void DrawControls()
        {
            if (IsLoad)
            {
                string accessory = string.Empty;
                string endOfTopic;

                switch (typeOfAccessory)
                {
                case TypeOfAccessories.Lamp:
                    accessory = "Лампа";
                    break;

                case TypeOfAccessories.Case:
                    accessory = "Світильник";
                    break;

                case TypeOfAccessories.ElectronicUnit:
                    accessory = "Ел.блок";
                    break;
                }

                switch (newState)
                {
                case TypesOfLampsStatus.Storage:
                    endOfTopic = "зберігання";
                    break;

                case TypesOfLampsStatus.ToCharge:
                    endOfTopic = "списання";
                    break;

                default:
                    const string message = "Для даного статусу не реалізовано логіку!";
                    ShowMessage(message);
                    throw new Exception(message);
                }

                MainProcess.CreateLabel(string.Format("{0} буде поставленно на {1}!", accessory, endOfTopic),
                                        5, 105, 230, 65, MobileFontSize.Multiline,
                                        MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);
                MainProcess.CreateLabel("Зберегти дані?", 5, 190, 230,
                                        MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Info);

                MainProcess.CreateButton("Ок", 10, 275, 105, 35, "ok", Save_click);
                MainProcess.CreateButton("Відміна", 125, 275, 105, 35, "cancel", Cancel_click);
            }
        }
Exemplo n.º 21
0
        private void createReturnWareStepControls()
        {
            returnWareControls = new ReturnWareControls();

            int top = TOPMOST_CONTROL_Y_POSITION;


            returnWareControls.WareLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230,
                                                                   MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.PartyLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230,
                                                                    MobileFontSize.Little, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.QuantityLabel = MainProcess.CreateLabel("Кол-во единиц", 5, top, 160,
                                                                       MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            returnWareControls.UnitsCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty,
                                                                             ControlsStyle.LabelNormal, null, false);


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.QuantityBoxesLabel = MainProcess.CreateLabel("Кол-во упак.", 5, top, 160,
                                                                            MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            returnWareControls.PacksCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty,
                                                                             ControlsStyle.LabelNormal, null, false);


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.LinerButton = MainProcess.CreateButton("<без прокладки>", 5, top, 230, 30, string.Empty,
                                                                      chooseLiner_ButtonClick);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS + 10;
            returnWareControls.LinersQuantityLabel = MainProcess.CreateLabel("Кол-во прокл.", 5, top, 160,
                                                                             MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);
            returnWareControls.LinersCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty,
                                                                              ControlsStyle.LabelNormal, null, false);

            updateLinerName();

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.ScanPalletLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230,
                                                                         MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            returnWareControls.NewPalletButton = MainProcess.CreateButton("Новая паллета", 5, top, 230, 40, string.Empty,
                                                                          newPallet_ButtonClick);
        }
Exemplo n.º 22
0
        public override sealed void DrawControls()
        {
            if (IsLoad)
            {
                MainProcess.ClearControls();
                MainProcess.CreateLabel("Відскануйте", 0, 130, 240,
                                        MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold);
                MainProcess.CreateLabel("ШТРИХ-КОД!", 0, 150, 240,
                                        MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Info, FontStyle.Bold);

                if (currentType != typeof(Cases))
                {
                    MainProcess.CreateButton("Без штрихкода", 10, 270, 220, 35, string.Empty, () => OnBarcode(string.Empty));
                }
            }
        }
Exemplo n.º 23
0
        public override void DrawControls()
        {
            InitDatabase();

            if (!isEmptyCriterions)
            {
                isEmptyCriterions = ShowQuery("Выполнить обновление номенклатуры и критериев оценивания?");
            }

            if (isEmptyCriterions)
            {
                if (!UpdateRules())
                {
                    throw new ConnectionIsNotExistsException("нужно обновить критерии оценивания и номенклатуру!");
                }
            }

            MainProcess.ClearControls();

            MainProcess.ToDoCommand = "Регистрация качества";

            labelControl              = (MainProcess.CreateLabel("", 5, 59, 229, 39, ControlsStyle.LabelMultilineSmall).GetControl()) as Label;
            textBoxControl            = (MainProcess.CreateTextBox(0, 0, 0, "", ControlsStyle.LabelH2, onTextBoxEndEdit, false)).GetControl() as TextBox;
            textBoxControl.LostFocus += new EventHandler(textBoxControl_LostFocus);
            textBoxControl.Hide();
            Nomenclature = "";

            #region Создание рабочей таблицы

            var dataTable = new DataTable();
            dataTable.Columns.AddRange(new DataColumn[] {
                new DataColumn("CriterionName", typeof(string)),
                new DataColumn("CriterionId", typeof(long)),
                new DataColumn("Mark", typeof(int)),
                new DataColumn("HaveSubCriterion", typeof(bool)),
                new DataColumn("ParentCriterionId", typeof(long))
            });

            #endregion

            table    = MainProcess.CreateTable("operations", 217, 99, onRowSelected);
            table.DT = dataTable;
            table.AddColumn("Критерий", "CriterionName", 180);
            table.AddColumn("Балл", "Mark", 34);

            table.Focus();
        }
Exemplo n.º 24
0
        private void startGroupRegistration()
        {
            currentCase = accessory as Cases;

            if (currentCase.Lamp == 0 || currentCase.ElectronicUnit == 0)
            {
                ShowMessage("Нужно заполнить лампу и эл. блок!");
                return;
            }

            if (!(accessory is Cases))
            {
                return;
            }

            currentLamp = new Lamps();
            currentLamp.Read(currentCase.Lamp);

            currentUnit = new ElectronicUnits();
            currentUnit.Read(currentCase.ElectronicUnit);

            if (!string.IsNullOrEmpty(currentLamp.BarCode) || !string.IsNullOrEmpty(currentUnit.BarCode))
            {
                ShowMessage("Для групової реєстрації лампа та блок мають бути без штрих-коду");
                return;
            }

            if (isMainDataEntered && warrantlyDataIsValid())
            {
                accessory.Write();
            }
            else
            {
                showWriteErrorMessage();
                return;
            }

            groupRegistration = true;

            currentCase = new Cases();
            currentCase.Read(accessory.Id);

            groupRegistrationButton.Hide();
            groupSizeLabel = MainProcess.CreateLabel("", 5, 283, 230,
                                                     MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Info, FontStyle.Bold);
            groupSize = 0;
        }
Exemplo n.º 25
0
        private void createIdentificationStepControls()
        {
            wareIdentificationControls = new WareIdentificationControls();

            int top = 42;

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            wareIdentificationControls.ScanWareLabel = MainProcess.CreateLabel("Сканируйте товар", 5, top, 230,
                                                                               MobileFontSize.Large, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            top += 2 * VERTICAL_DISTANCE_BETWEEN_CONTROLS;

            wareIdentificationControls.ComplateTipLabel = MainProcess.CreateLabel("Завершить F4", 5, top, 230,
                                                                                  MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Default, FontStyle.Bold);

            //wareIdentificationControls.ItIsKegButton = MainProcess.CreateButton("Возврат кеги", 5, 270, 230, 40, string.Empty, itIsKeg_ButtonClick);
        }
Exemplo n.º 26
0
        private void createLongControls()
        {
            dbFieldAtt attribute = Attribute.GetCustomAttribute(
                accessory.GetType().GetProperty(propertyName),
                typeof(dbFieldAtt)) as dbFieldAtt;

            if (attribute != null && attribute.dbObjectType != null)
            {
                DataTable sourceTable = new DataTable();
                sourceTable.Columns.AddRange(new[]
                {
                    new DataColumn("Number", typeof(int)),
                    new DataColumn("Description", typeof(string))
                });

                MobileTable visualTable = MainProcess.CreateTable("Table", 200, 65);
                visualTable.OnChangeSelectedRow += visualTable_OnChangeSelectedRow;
                visualTable.DT = sourceTable;
                visualTable.AddColumn("№", "Number", 34);
                visualTable.AddColumn("Назва", "Description", 180);

                string command = string.Format("SELECT Id,Description FROM {0} WHERE MarkForDeleting=0",
                                               attribute.dbObjectType.Name);
                DataTable table = null;
                using (SqlCeCommand query = dbWorker.NewQuery(command))
                {
                    table = query.SelectToTable();
                }

                foreach (DataRow row in table.Rows)
                {
                    visualTable.AddRow(row["Id"], row["Description"]);
                }

                visualTable.Focus();
                controls.Add(visualTable);
            }
            else
            {
                MainProcess.CreateLabel("Справочник/Документ пуст!", 5, 150, 230,
                                        MobileFontSize.Normal, MobileFontPosition.Center, MobileFontColors.Warning,
                                        FontStyle.Bold);
                controls.Add(MainProcess.CreateTable("Table", 200, 65));
            }
        }
Exemplo n.º 27
0
        /// <summary>Окно отображения информации</summary>
        /// <param name="topic">Заголовок</param>
        /// <param name="message">Сообщение</param>
        /// <param name="set">Набор кнопок навигации</param>
        /// <param name="firstButton">Делегат вызова при нажатии первой кнопки</param>
        /// <param name="secondButton">Делегат вызова при нажатии второй кнопки</param>
        private void messageWin(string topic, string message, ButtonsSet set, Stages firstButton, Stages secondButton)
        {
            MainProcess.ToDoCommand = topic;
            MainProcess.CreateLabel(message, 0, 150, 240, MobileFontSize.Multiline, MobileFontPosition.Center);

            switch (set)
            {
            case ButtonsSet.YesNo:
                MainProcess.CreateButton("Так", 15, 275, 100, 35, "firstButton", button_Click, firstButton, true);
                MainProcess.CreateButton("Ні", 125, 275, 100, 35, "secondButton", button_Click, secondButton, true);
                break;

            case ButtonsSet.OkCancel:
                MainProcess.CreateButton("Ок", 15, 275, 100, 35, "firstButton", button_Click, firstButton, true);
                MainProcess.CreateButton("Відміна", 125, 275, 100, 35, "secondButton", button_Click, secondButton, true);
                break;
            }
        }
Exemplo n.º 28
0
        private void DrawForm1Controls()
        {
            MainProcess.CreateLabel("Дата накладной:", 8, 70, 160, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 57, 95, 8, ControlsStyle.LabelNormal);
            MainProcess.CreateLabel(".", 118, 95, 8, ControlsStyle.LabelNormal);

            dayTextBox        = (MobileTextBox)MainProcess.CreateTextBox(9, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox      = (MobileTextBox)MainProcess.CreateTextBox(71, 95, 41, string.Empty, ControlsStyle.LabelLarge, false);
            monthTextBox.Text = DateTime.Now.Month.ToString();
            yearTextBox       = (MobileTextBox)MainProcess.CreateTextBox(132, 95, 71, string.Empty, ControlsStyle.LabelLarge, false);
            yearTextBox.Text  = DateTime.Now.Year.ToString();

            MainProcess.CreateLabel("Количество лет гарантии:", 8, 175, 224, ControlsStyle.LabelNormal);
            warrantyYearsQuantityTextBox      = (MobileTextBox)MainProcess.CreateTextBox(9, 207, 47, string.Empty, ControlsStyle.LabelLarge, false);
            warrantyYearsQuantityTextBox.Text = "0";

            MainProcess.CreateButton("Створити документ", 9, 250, 225, 40, string.Empty, startProcess);
        }
Exemplo n.º 29
0
        private void createPalletControls()
        {
            palletEditControls = new AcceptancePalletControls();
            int top = 42;


            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.nomenclatureLabel = MainProcess.CreateLabel("<номенклатура>", 5, top, 230,
                                                                           MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;

            palletEditControls.packsLabel = MainProcess.CreateLabel("упаковок:", 5, top, 80,
                                                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            palletEditControls.packsCountTextBox = MainProcess.CreateTextBox(90, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false);

            palletEditControls.unitsLabel = MainProcess.CreateLabel("+ шт.:", 135, top, 55,
                                                                    MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            palletEditControls.unitsCountTextBox = MainProcess.CreateTextBox(195, top, 40, string.Empty, ControlsStyle.LabelNormal, null, false);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.stickerIdInfoLabel = MainProcess.CreateLabel(string.Empty, 5, top, 230,
                                                                            MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.trayButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 35, "modelButton", trayButton_Click);
            updateTrayDescription();

            top += 2 * VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.linersLabel = MainProcess.CreateLabel("Кількість прокладок:", 5, top, 180,
                                                                     MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            palletEditControls.linersQuantityTextBox = MainProcess.CreateTextBox(190, top, 45, string.Empty, ControlsStyle.LabelNormal, null, false);

            top      += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            linerItem = new CatalogItem();
            palletEditControls.linerButton = MainProcess.CreateButton(string.Empty, 5, top, 230, 35, "modelButton", linerButton_Click);
            updateLinerButton();

            top += 2 * VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            palletEditControls.cellCaptionLabel = MainProcess.CreateLabel("Комірка:", 5, top, 80,
                                                                          MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
            palletEditControls.cellLabel = MainProcess.CreateLabel("<?>", 95, top, 140,
                                                                   MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
        }
Exemplo n.º 30
0
        private void createScanPalletLabelControls()
        {
            scanNextPalletControls = new ScanPalletControls();

            int top = 60;


            scanNextPalletControls.MovedPalletName = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                             MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            scanNextPalletControls.MovedPalletCell = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                             MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            top += VERTICAL_DISTANCE_BETWEEN_CONTROLS;
            scanNextPalletControls.PreviousCodeForMovedPallet = MainProcess.CreateLabel(string.Empty, 10, top, 230,
                                                                                        MobileFontSize.Normal, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Regular);

            scanNextPalletControls.WillLabel = MainProcess.CreateLabel("Відскануйте палету", 10, 190, 230,
                                                                       MobileFontSize.Large, MobileFontPosition.Left, MobileFontColors.Default, FontStyle.Bold);
        }