Ejemplo n.º 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (rb_users.Checked)
     {
         Form f = new User(dgv.SelectedCells[0].Value.ToString());
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_auto.Checked)
     {
         Form f = new Auto(dgv.SelectedCells[0].Value.ToString());
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_aper.Checked)
     {
         Form f = new Auto_Personnel(dgv.SelectedCells[0].Value.ToString());
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_journal.Checked)
     {
         Form f = new Journal(dgv.SelectedCells[0].Value.ToString());
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_routes.Checked)
     {
         Form f = new Routes(dgv.SelectedCells[0].Value.ToString());
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
 }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (rb_users.Checked)
     {
         Form f = new User();
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_auto.Checked)
     {
         Form f = new Auto();
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_aper.Checked)
     {
         Form f = new Auto_Personnel();
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_journal.Checked)
     {
         Form f = new Journal();
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
     if (rb_routes.Checked)
     {
         Form f = new Routes();
         f.FormClosed += updateDB;
         f.ShowDialog();
     }
 }