private void tsbPrint_Click(object sender, EventArgs e) { try { InDonHangTraLai(); if (Business.ListChungTuThanhToan != null && MessageBox.Show("Có in kèm phiếu thu hay không?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.Yes) { foreach (ChungTuThanhToanInfor tt in Business.ListChungTuThanhToan) { if (tt.LoaiThanhToan != -1)//khong phai voucher thi in ra { rpt_PhieuChiTien rp = new rpt_PhieuChiTien(tt); rp.ShowPreview(); } } } } catch (Exception ex) { EventLogProvider.Instance.WriteLog(ex.ToString() + "\nUser: "******"\nMay: " + Declare.TenMay, this.Name); MessageBox.Show("Loi: " + ex.ToString()); } }
private void tsbPrint_Click(object sender, EventArgs e) { try { foreach (ChungTuThanhToanInfor tt in Business.ListChungTuThanhToan) { rpt_PhieuChiTien rp = new rpt_PhieuChiTien(tt); rp.ShowPreview(); } } catch (Exception ex) { EventLogProvider.Instance.WriteLog(ex.ToString() + "\nUser: "******"\nMay: " + Declare.TenMay, this.Name); MessageBox.Show("Loi: " + ex.ToString()); } }
private void tsbPrint_Click(object sender, EventArgs e) { try { if (UpdateChungTu()) { foreach (ChungTuThanhToanInfor tt in Business.ListChungTuThanhToan) { if (tt.LoaiThanhToan != -1) //khong phai voucher thi in ra { rpt_PhieuChiTien rp = new rpt_PhieuChiTien(tt); rp.ShowPreview(); } } this.Close(); } } catch (Exception ex) { MessageBox.Show("Loi: " + ex.ToString()); } }