private void grvPhieuTra_CellContentClick(object sender, DataGridViewCellEventArgs e) { txtMaPM.Text = grvPhieuTra.CurrentRow.Cells[0].Value.ToString(); txtTenBD.Text = bdB.searchBD(pmB.getPMbyID(txtMaPM.Text).IdBD).Name; txtNM.Text = grvPhieuTra.CurrentRow.Cells[4].Value.ToString(); txtSach.Text = sachB.getSachbyID(pmB.getPMbyID(txtMaPM.Text).IdSach).Name; }
private void btnSua_Click(object sender, EventArgs e) { enable(); txtMaPM.Enabled = false; cbbTenBD.Enabled = false; loadCBB(); isThem = false; txtNV.Text = nvB.getFullNamebyUsername(Form1.username).TenNV; cbbTenBD.Text = bdB.searchBD(pmB.getPMbyID(txtMaPM.Text).IdBD).Name; cbbSach.Text = sachB.getSachbyID(pmB.getPMbyID(txtMaPM.Text).IdSach).Name; curSach = pmB.getPMbyID(txtMaPM.Text).IdSach; btnLuu.Enabled = true; }
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; }