public PlatesSettingsForm(MaxigrafPlate plate)
        {
            InitializeComponent();

            Plate = plate;
            Text += $" {Plate.PlateName}";

            UpdateDataSource();
        }
 private bool FindPlate()
 {
     _plate = MatchPlate(_inputData.MS_CODE);
     if (_plate == null)
     {
         MessageBox.Show($"Не найдена табличка, удовлетворяющая данному MSCode {_inputData.MS_CODE}");
         Close();
         return(false);
     }
     return(true);
 }
Exemplo n.º 3
0
 private void LoadPlate()
 {
     if (IncomingPlate == null)
     {
         IncomingPlate = new MaxigrafPlate();
     }
     tbName.Text          = IncomingPlate.PlateName;
     tbDescription.Text   = IncomingPlate.PlateDescription;
     tbPath.Text          = IncomingPlate.ScriptPath;
     tbRegex.Text         = IncomingPlate.Regex;
     tbProcedureName.Text = IncomingPlate.StoredProcedureName;
 }
Exemplo n.º 4
0
        private void BtnAddPlate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var plate = new MaxigrafPlate();

            if (new AddPlateForm(plate).ShowDialog() == DialogResult.OK)
            {
                var(result, error) = (new MaxigrafPlatesDatabaseAdapter()).Insert(new List <MaxigrafPlate> {
                    plate
                });

                if (result == Result.Unsuccess)
                {
                    MessageBox.Show($"Произошла ошибка: {error}", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    UpdateDataSource();
                }
            }
        }
Exemplo n.º 5
0
 public AddPlateForm(MaxigrafPlate plate)
 {
     InitializeComponent();
     IncomingPlate = plate;
     LoadPlate();
 }