Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            AddUpdateSubject frm = new AddUpdateSubject();

            frm.ShowDialog();
            refreshGrid();
        }
Exemple #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (dataGridView1.Rows.Count > 0)
     {
         AddUpdateSubject frm = new AddUpdateSubject(dataGridView1.SelectedRows[0].Cells[1].Value.ToString(),
                                                     dataGridView1.SelectedRows[0].Cells[2].Value.ToString(),
                                                     int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()),
                                                     dataGridView1.SelectedRows[0].Cells[3].Value.ToString());
         frm.ShowDialog();
         refreshGrid();
     }
 }