Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var window = new EmployeeEditor();

            window.ShowDialog();
            textBox1_TextChanged(sender, e);
        }
Ejemplo n.º 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         if (dataGridView1.CurrentRow == null)
         {
             throw new Exception("Не выделен объект для редактирования");
         }
         var window = new EmployeeEditor((Employee)dataGridView1.CurrentRow.DataBoundItem);
         window.ShowDialog();
         textBox1_TextChanged(sender, e);
         dataGridView1.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }