Beispiel #1
0
        private void dgvSinhVien_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            frmSuaSinhVien frmSuaSinhVien = new frmSuaSinhVien();

            if (dgvSinhVien.CurrentRow.Cells[0].Value != null)
            {
                SetValue1 = dgvSinhVien.CurrentRow.Cells[0].Value.ToString();
                SetValue2 = dgvSinhVien.CurrentRow.Cells[1].Value.ToString();
                SetValue3 = dgvSinhVien.CurrentRow.Cells[2].Value.ToString();
                if (dgvSinhVien.CurrentRow.Cells[3].Value.ToString() == "Nam")
                {
                    SetValue4 = "Nam";
                }
                else
                {
                    SetValue4 = "Nu";
                }
                SetValue5 = dgvSinhVien.CurrentRow.Cells[4].Value.ToString();
                SetValue6 = dgvSinhVien.CurrentRow.Cells[5].Value.ToString();
                SetValue7 = dgvSinhVien.CurrentRow.Cells[6].Value.ToString();
                SetValue8 = dgvSinhVien.CurrentRow.Cells[7].Value.ToString();
                frmSuaSinhVien.ShowDialog();
                Reload();
            }
            else
            {
                frmThemSinhVien frmThem = new frmThemSinhVien();
                frmThem.ShowDialog();
                Reload();
            }
        }
Beispiel #2
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            frmThemSinhVien frmThem = new frmThemSinhVien();

            frmThem.ShowDialog();
            Reload();
        }