//Hiennv private void btnPrintSplitBill_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(lueIndexSub.Text) == true) { lueIndexSub.Focus(); MessageBox.Show("Vui lòng chọn phiếu thanh toán cần in !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { int indexSub = Convert.ToInt32(lueIndexSub.Text); frmRpt_SplitPayment_BookingHs afrmRpt_SplitPayment_BookingHs = new frmRpt_SplitPayment_BookingHs(this.aPaymentHallsEN,indexSub); ReportPrintTool tool = new ReportPrintTool(afrmRpt_SplitPayment_BookingHs); tool.ShowPreview(); } } catch (Exception ex) { MessageBox.Show("frmTsk_SplitBillHalls_Step2_Load.btnPrintSplitBill_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//Hiennv private void btnPrintSplitBill_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(lueIndexSub.Text) == true) { lueIndexSub.Focus(); MessageBox.Show("Vui lòng chọn phiếu thanh toán cần in !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { int indexSub = Convert.ToInt32(lueIndexSub.Text); if ((this.aListRooms.Count() == 0 && this.aListServicesR.Count() == 0) && (this.aListHalls.Count() > 0 || this.aListServicesH.Count() > 0)) { frmRpt_SplitPayment_BookingHs afrmRpt_SplitPayment_BookingHs = new frmRpt_SplitPayment_BookingHs(this.aNewPaymentEN, indexSub); ReportPrintTool toolHall = new ReportPrintTool(afrmRpt_SplitPayment_BookingHs); toolHall.ShowPreview(); } else if ((this.aListHalls.Count() == 0 && this.aListServicesH.Count() == 0) && (this.aListRooms.Count() > 0 || this.aListServicesR.Count() > 0)) { frmRpt_SplitPayment_BookingRs afrmRpt_SplitPayment_BookingRs = new frmRpt_SplitPayment_BookingRs(this.aNewPaymentEN, indexSub); ReportPrintTool toolRoom = new ReportPrintTool(afrmRpt_SplitPayment_BookingRs); toolRoom.ShowPreview(); } else { frmRpt_SplitPayment_BookingRsAndBookingHs afrmRpt_SplitPayment_BookingRsAndBookingHs = new frmRpt_SplitPayment_BookingRsAndBookingHs(this.aNewPaymentEN, indexSub); ReportPrintTool tool = new ReportPrintTool(afrmRpt_SplitPayment_BookingRsAndBookingHs); tool.ShowPreview(); } } } catch (Exception ex) { MessageBox.Show("frmTsk_SplitBill_Step2_Load.btnPrintSplitBill_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }