//click button thêm sẽ sang frm_hoadonbosung private void btn_themhd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frm_Hoadonbosung hdbs = new frm_Hoadonbosung(strConnect); hdbs.btn_capnhat.Enabled = false; hdbs.Show(); }
//click button sẽ sang frm_hoadonbosung thực hiện chức năng cập nhật hóa đơn private void btn_capnhathd_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frm_Hoadonbosung hdbs = new frm_Hoadonbosung(strConnect); hdbs.Show(); hdbs.txt_mahienthi.Text = dgv_hoadonbs.GetRowCellValue(dgv_hoadonbs.FocusedRowHandle, "hienthima").ToString(); hdbs.txt_soluong.Text = dgv_hoadonbs.GetRowCellValue(dgv_hoadonbs.FocusedRowHandle, "soluong").ToString(); hdbs.txt_nguoicap.Text = dgv_hoadonbs.GetRowCellValue(dgv_hoadonbs.FocusedRowHandle, "nguoicap").ToString(); hdbs.txt_motahd.Text = dgv_hoadonbs.GetRowCellValue(dgv_hoadonbs.FocusedRowHandle, "mota").ToString(); hdbs.dtp_ngaycap.Text = dgv_hoadonbs.GetRowCellValue(dgv_hoadonbs.FocusedRowHandle, "ngaycap").ToString(); hdbs.btn_them.Enabled = false; hdbs.txt_mahienthi.Enabled = false; }