Example #1
0
 private void btbandoc(object sender, EventArgs e)
 {
     try
     {
         DocGia dg = DocGia.GetDSDocGia().Find(c => c.MaDocGia == txtMaDocGia.Text);
         txtIDDocGia.Text = dg.IDDocGia.ToString();
         txtHoTen.Text    = dg.HoTen;
         Lop lop = Lop.GetLopTheoID(dg.IDLop);
         txtLop.Text    = lop.TenLop;
         txtDiaChi.Text = dg.DiaChi;
         Khoa khoa = Khoa.GetDSKhoa().Find(c => c.IDKhoa == lop.IDKhoa);
         txtKhoa.Text = khoa.TenKhoa;
         txtHoTen.Tag = dg.Lock;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }