Пример #1
0
 private void Sua()
 {
     try
     {
         if (string.IsNullOrEmpty(dgv_DanhSach.ActiveRow.Cells["MaSV"].Text))
         {
             return;
         }
         var frm = new FrmThemsinhvien
         {
             txtmasinhvien  = { Text = dgv_DanhSach.ActiveRow.Cells["MaSV"].Text, ReadOnly = true },
             txthotendem    = { Text = dgv_DanhSach.ActiveRow.Cells["HoSV"].Text },
             txttensinhvien = { Text = dgv_DanhSach.ActiveRow.Cells["TenSV"].Text },
             cbongaysinh    = { Text = dgv_DanhSach.ActiveRow.Cells["NgaySinh"].Text },
         };
         frm.CheckUpdate = true;
         frm.ShowDialog();
         if (frm.CheckUpdate)
         {
             return;
         }
         dgv_DanhSach.ActiveRow.Cells["HoSV"].Value     = frm.txthotendem.Text;
         dgv_DanhSach.ActiveRow.Cells["TenSV"].Value    = frm.txttensinhvien.Text;
         dgv_DanhSach.ActiveRow.Cells["NgaySinh"].Value = frm.cbongaysinh.Text;
         dgv_DanhSach.ActiveRow.Cells["MaLop"].Value    = frm.cbolop.Text;
         dgv_DanhSach.ActiveRow.Cells["TenKhoa"].Value  = frm.cbokhoa.Text;
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
Пример #2
0
 public void Themmoi()
 {
     _frmThemsinhvien = new FrmThemsinhvien();
     _frmThemsinhvien.Themmoisinhvien += Themmoisinhvien;
     _frmThemsinhvien.ShowDialog();
 }