Example #1
0
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            if ((bool)e.SelectedRow["HaveSubCriterion"])
            {
                table.DataGrid.CurrentRowIndex = table.DataGrid.CurrentRowIndex < (table.RowsCount - 1) ? table.DataGrid.CurrentRowIndex + 1 : table.DataGrid.CurrentRowIndex;
                onRowSelected(sender, new OnRowSelectedEventArgs(table.DT.Rows[table.DataGrid.CurrentRowIndex]));
            }
            else
            {
                DataGridCell editCell = table.DataGrid.CurrentCell;

                Rectangle cellPos = table.DataGrid.GetCellBounds(editCell.RowNumber, 1);
                textBoxControl.Left   = cellPos.Left + 3;
                textBoxControl.Top    = cellPos.Top + table.DataGrid.Top;
                textBoxControl.Width  = cellPos.Width;
                textBoxControl.Height = cellPos.Height;

                textBoxControl.Tag  = e.SelectedRow;
                textBoxControl.Text = e.SelectedRow["Mark"].ToString();
                textBoxControl.Show();
                textBoxControl.SelectionStart  = 0;
                textBoxControl.SelectionLength = textBoxControl.Text.Length;
                textBoxControl.Focus();
            }
        }
Example #2
0
        /// <summary>Выбор строки в таблице</summary>
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            long mapId = Convert.ToInt64(e.SelectedRow["Id"]);

            //Если таблица - значит есть вложенные карты. Опять отобразить
            if (checkIncludeMapOrInfo(mapId))
            {
                MainProcess.ClearControls();
                MainProcess.Process = new SelectMap(MainProcess, mapId, LampBarCode);
            }
            //Иначе - результат (выбранная карта)
            else
            {
                object[] array  = getMapInfo(mapId);
                int      start  = Convert.ToInt32(array[2]);
                int      finish = Convert.ToInt32(array[3]);
                MapInfo = new MapInfo(array[0], array[1].ToString(), start, finish);

                MainProcess.ClearControls();
                MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode)
                {
                    MapInfo = MapInfo
                };
            }
        }
Example #3
0
        /// <summary>Позиция выбрана</summary>
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            string position = e.SelectedRow["Position"].ToString();

            MainProcess.ClearControls();
            MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode)
            {
                MapInfo  = MapInfo,
                Register = Register,
                Position = position
            };
        }
Example #4
0
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            short type = (short)(e.SelectedRow["type"]);

            switch (type)
            {
            case 1:
            {
                OnHotKey(KeyAction.Proceed);
                return;
            }

            case 2:
            {
                BusinessProcess process;

                try
                {
                    process = new QualityRegistrationProcess(MainProcess);
                }
                catch (ConnectionIsNotExistsException exp)
                {
                    ShowMessage(exp.Message);
                    return;
                }

                MainProcess.Process = process;
                return;
            }

            case 3:
            {
                BusinessProcess process;

                try
                {
                    process = new RawProductionQualityRegistrationProcess(MainProcess);
                }
                catch (ConnectionIsNotExistsException exp)
                {
                    ShowMessage(exp.Message);
                    return;
                }

                MainProcess.Process = process;
                return;
            }
            }
        }
Example #5
0
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            DataGridCell editCell = table.DataGrid.CurrentCell;

            Rectangle cellPos = table.DataGrid.GetCellBounds(editCell.RowNumber, 1);

            textBoxControl.Left   = cellPos.Left + 3;
            textBoxControl.Top    = cellPos.Top + table.DataGrid.Top;
            textBoxControl.Width  = cellPos.Width;
            textBoxControl.Height = cellPos.Height;

            textBoxControl.Tag  = e.SelectedRow;
            textBoxControl.Text = e.SelectedRow["Mark"].ToString();
            textBoxControl.Show();
            textBoxControl.SelectionStart  = 0;
            textBoxControl.SelectionLength = textBoxControl.Text.Length;
            textBoxControl.Focus();
        }
Example #6
0
 /// <summary>Позиция выбрана</summary>
 private void onRowSelected(object sender, OnRowSelectedEventArgs e)
 {
     string position = e.SelectedRow["Position"].ToString();
     MainProcess.ClearControls();
     MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode)
                               {
                                   MapInfo = MapInfo,
                                   Register = Register,
                                   Position = position
                               };
 }
Example #7
0
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            short type = (short)(e.SelectedRow["type"]);

            switch (type)
            {
                case 1:
                    {
                        OnHotKey(KeyAction.Proceed);
                        return;
                    }
                case 2:
                    {
                        BusinessProcess process;

                        try
                        {
                            process = new QualityRegistrationProcess(MainProcess);
                        }
                        catch (ConnectionIsNotExistsException exp)
                        {
                            ShowMessage(exp.Message);
                            return;
                        }

                        MainProcess.Process = process;
                        return;
                    }
                case 3:
                    {
                        BusinessProcess process;

                        try
                        {
                            process = new RawProductionQualityRegistrationProcess(MainProcess);
                        }
                        catch (ConnectionIsNotExistsException exp)
                        {
                            ShowMessage(exp.Message);
                            return;
                        }

                        MainProcess.Process = process;
                        return;
                    }
            }
        }
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            if ((bool)e.SelectedRow["HaveSubCriterion"])
            {
                table.DataGrid.CurrentRowIndex = table.DataGrid.CurrentRowIndex < (table.RowsCount - 1) ? table.DataGrid.CurrentRowIndex + 1 : table.DataGrid.CurrentRowIndex;
                onRowSelected(sender, new OnRowSelectedEventArgs(table.DT.Rows[table.DataGrid.CurrentRowIndex]));
            }
            else
            {
                DataGridCell editCell = table.DataGrid.CurrentCell;

                Rectangle cellPos = table.DataGrid.GetCellBounds(editCell.RowNumber, 1);
                textBoxControl.Left = cellPos.Left + 3;
                textBoxControl.Top = cellPos.Top + table.DataGrid.Top;
                textBoxControl.Width = cellPos.Width;
                textBoxControl.Height = cellPos.Height;

                textBoxControl.Tag = e.SelectedRow;
                textBoxControl.Text = e.SelectedRow["Mark"].ToString();
                textBoxControl.Show();
                textBoxControl.SelectionStart = 0;
                textBoxControl.SelectionLength = textBoxControl.Text.Length;
                textBoxControl.Focus();
            }
        }
Example #9
0
        /// <summary>Выбор строки в таблице</summary>
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            long mapId = Convert.ToInt64(e.SelectedRow["Id"]);

            //Если таблица - значит есть вложенные карты. Опять отобразить
            if (checkIncludeMapOrInfo(mapId))
                {
                MainProcess.ClearControls();
                MainProcess.Process = new SelectMap(MainProcess, mapId, LampBarCode);
                }
            //Иначе - результат (выбранная карта)
            else
                {
                object[] array = getMapInfo(mapId);
                int start = Convert.ToInt32(array[2]);
                int finish = Convert.ToInt32(array[3]);
                MapInfo = new MapInfo(array[0], array[1].ToString(), start, finish);

                MainProcess.ClearControls();
                MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode) { MapInfo = MapInfo };
                }
        }
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            DataGridCell editCell = table.DataGrid.CurrentCell;

            Rectangle cellPos = table.DataGrid.GetCellBounds(editCell.RowNumber, 1);
            textBoxControl.Left = cellPos.Left + 3;
            textBoxControl.Top = cellPos.Top + table.DataGrid.Top;
            textBoxControl.Width = cellPos.Width;
            textBoxControl.Height = cellPos.Height;

            textBoxControl.Tag = e.SelectedRow;
            textBoxControl.Text = e.SelectedRow["Mark"].ToString();
            textBoxControl.Show();
            textBoxControl.SelectionStart = 0;
            textBoxControl.SelectionLength = textBoxControl.Text.Length;
            textBoxControl.Focus();
        }