private void barButtonItemXuatPhieu_ItemClick(object sender, ItemClickEventArgs e) { kiemTraTrungMatHang(); bool re = LuuPhieuNhap(); bool res = LuuChiTietHoaDon(); frmPrintInvoice frm = new frmPrintInvoice(dataGridViewChiTietPhieuNhapKho, nhanVienNhapKho, tongTien.ToString(), TongSo.ToString(), PathForInvoicePrinting.ToString(), txtMaPhieu.Text.ToString()); frm.Visible = false; frm.Show(); if (re && res) { XtraMessageBox.Show("HÓA ĐƠN ĐÃ ĐƯỢC LẬP!", "Notifications!", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnXuatHoaDon_ItemClick(object sender, ItemClickEventArgs e) { kiemTraTrungMatHang(); bool re = LuuHoaDon(); bool res = LuuChiTietHoaDon(); frmPrintInvoice frm = new frmPrintInvoice(dataGridViewChiTietHoaDon, nhanVienHoaDon, tongTien.ToString(), txtTienKhachDua.Text.ToString(), tienTraLai.ToString(), TongSo.ToString(), PathForInvoicePrinting.ToString(), txtSoHoaDon.Text.ToString()); frm.Show(); frm.Hide(); if (re && res) { XtraMessageBox.Show("HÓA ĐƠN ĐÃ ĐƯỢC LẬP!", "Notifications!", MessageBoxButtons.OK, MessageBoxIcon.Information); } }