private void dlgSinhVien_Load(object sender, EventArgs e) { LoadComBo(); if (edit == EDIT_MODE.SUA) { FillData(); } else { cmbDM_Lop.EditValue = IDDM_Lop; if (dtSinhVien.Rows.Count > 0) { txtMaSV.Text = oBSV_SinhVien.GetNextMaSinhVien(IDDM_Lop, "" + dtSinhVien.Rows[0]["MaSinhVien"]); } else { txtMaSV.Text = oBSV_SinhVien.GetNextMaSinhVien(IDDM_Lop, ""); } txtHoVaTen.Focus(); } }