コード例 #1
0
        private void btnPrintByCustomer_Click(object sender, EventArgs e)
        {
            CustomersBO aCustomersBO = new CustomersBO();
            Customers aCustomer = new Customers();
            aCustomer = aCustomersBO.Select_ByID(int.Parse(loeListCustomer.EditValue.ToString()));
            this.aNewPaymentEN = this.aNewPaymentEN.SlipPaymentByCustomer(aCustomer);

            try
            {
                if (this.aNewPaymentEN.Status_BookingR == 8 || this.aNewPaymentEN.Status_BookingR == 7)
                {

                    frmRpt_Payment_BookingRs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRs(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
                else
                {
                    frmRpt_Payment_BookingRsUnPay afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRsUnPay(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("frmTsk_ChoosePrintType.btnPrint_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        // Chức năng thanh toán phòng
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {
                if (aNewPaymentEN.Status_BookingR == 8 || aNewPaymentEN.Status_BookingR == 7)
                {

                    frmRpt_Payment_BookingRs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRs(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
                else
                {
                    frmRpt_Payment_BookingRsUnPay afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRsUnPay(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("frmTsk_PaymentStep2.btnPrint_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        // Thanh toán tổng
        private void btnPrintPaymentTotal_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.aNewPaymentEN.aListBookingRoomUsed.Count > 0 && this.aNewPaymentEN.aListBookingHallUsed.Count > 0)
                {
                    frmRpt_Payment_BookingRsAndBookingHs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRsAndBookingHs(this.aNewPaymentEN);
                    ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                    tool.ShowPreview();
                }
                else
                {
                    if (this.aNewPaymentEN.aListBookingRoomUsed.Count > 0)
                    {
                        frmRpt_Payment_BookingRs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRs(this.aNewPaymentEN);
                        ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
                        tool.ShowPreview();
                    }
                    else if (this.aNewPaymentEN.aListBookingHallUsed.Count > 0)
                    {
                        frmRpt_PaymentBookingHs afrmRpt_PaymentBookingHs = new frmRpt_PaymentBookingHs(this.aNewPaymentEN);
                        ReportPrintTool tool = new ReportPrintTool(afrmRpt_PaymentBookingHs);
                        tool.ShowPreview();
                    }
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("frmTsk_PaymentStep2.btnPrintPaymentTotal_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }