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); }
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; }
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(); } } }
public AddPlateForm(MaxigrafPlate plate) { InitializeComponent(); IncomingPlate = plate; LoadPlate(); }