Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     AddEditEmployee v = new AddEditEmployee() { User = User };
     v.ShowDialog();
     if (v.DialogResult == DialogResult.OK)
     {
         Rebind();
     }
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {

                int workingIndex = dataGridView1.SelectedRows[0].Index;
                AddEditEmployee c = new AddEditEmployee();
                c.User = User;
                c.currentEmployeeId = employees[workingIndex].Id;

                c.ShowDialog();
                if(c.DialogResult==DialogResult.OK)
                {
                    Rebind();
                }
            }
        }