示例#1
0
        private void btnTim_Click(object sender, EventArgs e)
        {
            bdBUS  bdB = new bdBUS();
            nvBUS  nvB = new nvBUS();
            BanDoc bd  = bdB.searchBD(txtMaSo.Text);

            txtMaSo.Text     = bd.Id;
            txtTenBD.Text    = bd.Name;
            txtDiaChi.Text   = bd.Address;
            txtCMND.Text     = bd.Cmnd;
            txtNgaySinh.Text = bd.Ngaysinh;
            txtEmail.Text    = bd.Email;
            txtNgayLap.Text  = bd.Ngaylap;
            txtNguoiLap.Text = nvB.getFullNamebyID(bd.Nguoilap).TenNV;
        }
示例#2
0
 private void btnTim_Click(object sender, EventArgs e)
 {
     if (pmB.CheckID(txtMaPM.Text))
     {
         txtTenBD.Text = bdB.searchBD(pmB.getPMbyID(txtMaPM.Text).IdBD).Name;
         txtSach.Text  = sachB.getSachbyID(pmB.getPMbyID(txtMaPM.Text).IdSach).Name;
         txtNM.Text    = pmB.getPMbyID(txtMaPM.Text).Ngaymuon;
         txtNT.Text    = pmB.getPMbyID(txtMaPM.Text).Ngaytra;
         NhanVien nv = nvB.getFullNamebyID(pmB.getPMbyID(txtMaPM.Text).IdNVTra);
         if (nv == null)
         {
             txtNV.Text = "";
         }
         else
         {
             txtNV.Text = nv.TenNV;
         }
     }
     else
     {
         MessageBox.Show(txtMaPM.Text + "Khong ton tai!!!");
     }
 }