private void btnUpdateBillExport_Click(object sender, EventArgs e) { if (txtIDBillExport.Text == "") { MessageBox.Show("Bạn phải chọn Hóa đơn cần chỉnh sửa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearDisplay(); return; } HoaDonBanHang_DTO phieunhap = new HoaDonBanHang_DTO(); phieunhap.MaHDB = (string)dtgvInfoListOfBillExport.CurrentRow.Cells["MaHDB"].Value; phieunhap.MaKH = txtIDCustomer.Text.ToString(); phieunhap.TenKH = txtNameCustomer.Text.ToString(); phieunhap.NgayNhap = Convert.ToDateTime(dtpkDateTimeExport.Text.ToString()); phieunhap.TenCH = txtNameStore.Text; phieunhap.TongTien = Convert.ToDouble(txtTotalPayExport.Text.ToString()); phieunhap.TongNo = Convert.ToDouble(txtTotalDebtExport.Text.ToString()); if (HoaDonBanHang_BUS.SuaPHBan(phieunhap)) { LoadPhieuBanHang(); MessageBox.Show("Hóa đơn bán hàng cập nhật thành công !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearDisplay(); return; } MessageBox.Show("Hóa đơn bán hàng cập nhật thất bại !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); }