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

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

            frmThemGiaovien.ShowDialog();
            Reload();
        }