예제 #1
0
        private void Frm_Report_Load(object sender, EventArgs e)
        {
            if (type == "1")
            {
                Rp_POS_Monitor cry = new Rp_POS_Monitor();
                cry.SetDataSource(dt);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "2")
            {
                Rp_POS_Activity cry = new Rp_POS_Activity();
                cry.SetDataSource(dt);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "3")
            {
                Rp_Chargeback_BNK cry = new Rp_Chargeback_BNK();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "4")
            {
                Rp_Card_Info cry = new Rp_Card_Info();
                cry.SetDataSource(dt);
                //cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                //cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "PHT05")
            {
                rpt_PHT05 cry = new rpt_PHT05();
                cry.SetDataSource(dt);
                //cry.SetParameterValue("@fromdate", DateTime.Now.ToShortDateString());
               // cry.SetParameterValue("@todate", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("NhanVien", NhanVien);
                cry.SetParameterValue("@User", Businessbp.executedb.Usrid);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "PHT03")
            {
                rpt_PHT03 cry = new rpt_PHT03();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                //cry.SetParameterValue("NhanVien", NhanVien);
                cry.SetParameterValue("@User", Businessbp.executedb.Usrid);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "PHT04")
            {
                rpt_PHT04 cry = new rpt_PHT04();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                //cry.SetParameterValue("NhanVien", NhanVien);
                cry.SetParameterValue("@User", Businessbp.executedb.Usrid);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "PHT17")
            {
                rpt_PHT17 cry = new rpt_PHT17();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("@User", Businessbp.executedb.Usrid);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "POS_1")
            {
                Rp_POS_Issuance_GNDaiLy cry = new Rp_POS_Issuance_GNDaiLy();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "POS_2")
            {
                Rp_POS_Issuance_GNSales cry = new Rp_POS_Issuance_GNSales();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }

            else if (type == "SALE_1")
            {
                Rp_Sale_POSCard cry = new Rp_Sale_POSCard();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "bal")
            {
                Rp_balance_enter cry = new Rp_balance_enter();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            // BẮT ĐẦU REPORT NHÓM: TƠ, A.QUÝ, NGUYÊN
            else if (type == "MC_7.4")
            {
                rpt_MC_R74 cry = new rpt_MC_R74();
                cry.SetDataSource(dt);
                cry.SetParameterValue("thoigian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_R2")
            {
                Rpt_MC_R2 cry = new Rpt_MC_R2();
                cry.SetDataSource(dt);
                cry.SetParameterValue("thoigian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_R5")
            {
                rpt_MC_R5 cry = new rpt_MC_R5();
                cry.SetDataSource(dt);
                cry.SetParameterValue("thoigian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_R6")
            {
                Rpt_MC_R6 cry = new Rpt_MC_R6();
                cry.SetDataSource(dt);
                cry.SetParameterValue("thoigian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_8")
            {
                Rpt_MC_R8 cry = new Rpt_MC_R8();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("Thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }

            //End nhom REPORT NHÓM: TƠ, A.QUÝ, NGUYÊN
            //Start Dat lam ngay 10/04/2012
            else if (type == "MC_R9")
            {
                rpt_MC_R9 cry = new rpt_MC_R9();
                cry.SetDataSource(dt);
                //  cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //  cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("Thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_R15")
            {
                rpt_MC_R15 cry = new rpt_MC_R15();
                cry.SetDataSource(dt);
              //  cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
              //  cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("Thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }
            //End Start Dat lam ngay 10/04/2012
            //Dat: Report Thanh toan dai ly
            else if (type == "BC_TTDL")
            {
                Rpt_TTDL_Sum cry = new Rpt_TTDL_Sum();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_R13")
            {
                Rpt_MC_R13 cry = new Rpt_MC_R13();
                cry.SetDataSource(dt);
                //cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_12")
            {
                rpt_MC_12 cry = new rpt_MC_12();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("title", title);
                cry.SetParameterValue("thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }//BILILING_CREDIT
            else if (type == "BILILING_CREDIT")
            {
                //Rp_BillingCredit cry = new Rp_BillingCredit();
                //Rpt_Credit_Billing cry = new Rpt_Credit_Billing();
                Rpt_Credit_Billing_new cry = new Rpt_Credit_Billing_new();
                cry.SetDataSource(dt);
               // cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("title", title);
                cry.SetParameterValue("title2", title2);
                cry.SetParameterValue("title3", title3);
               // cry.SetParameterValue("thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "BILILING_CREDIT_NQH")
            {
                //Rp_BillingCredit cry = new Rp_BillingCredit();
                //Rpt_Credit_Billing cry = new Rpt_Credit_Billing();
                Rpt_Credit_Billing_new cry = new Rpt_Credit_Billing_new();
                cry.SetDataSource(dt);
                // cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("title", title);
                cry.SetParameterValue("title2", title2);
                cry.SetParameterValue("title3", title3);
                // cry.SetParameterValue("thoigian", thoiGian);
                crystalReportViewer1.ReportSource = cry;
            }
            // BẮT ĐẦU REPORT CHARGEBACK
            else if (type == "MC_Reversal_1st_Presentment")
            {
                rpt_MC_Reversal_1st_Presentment cry = new rpt_MC_Reversal_1st_Presentment();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Retrival_Reversal")
            {
                rpt_MC_Retrival_Reversal cry = new rpt_MC_Retrival_Reversal();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Chargeback_Reversal")
            {
                rpt_MC_Chargeback_Reversal cry = new rpt_MC_Chargeback_Reversal();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Chargeback_DaTL")
            {
                rpt_MC_Chargeback_DaTL cry = new rpt_MC_Chargeback_DaTL();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Arbitration_Chargeback")
            {
                rpt_MC_Arbitration_Chargeback cry = new rpt_MC_Arbitration_Chargeback();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Reversal_2nd_Presentment")
            {
                rpt_MC_Reversal_2nd_Presentment cry = new rpt_MC_Reversal_2nd_Presentment();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_Report_Fee")
            {
                rpt_MC_Report_Fee cry = new rpt_MC_Report_Fee();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
                //End nhom REPORT CHARGEBACK
                //Dat 03/07/2012
            else if (type == "MC_BC_TH_FEE")
            {
                Rpt_MC_TONG_HOP_FEE cry = new Rpt_MC_TONG_HOP_FEE();
                cry.SetDataSource(dt);
                cry.SetParameterValue("thoigian", thoiGian);
                cry.SetParameterValue("title", title);
                cry.SetParameterValue("title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            //End Dat 03/07/2012
            else if (type == "MC_15")
            {
                rpt_MC_15 cry = new rpt_MC_15();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            else if (type == "MC_THANH_TOAN_FILE")
            {
                Rpt_MC_ThanhToan_File cry = new Rpt_MC_ThanhToan_File();
                cry.SetDataSource(dt);
               // cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("title", title);
                crystalReportViewer1.ReportSource = cry;
            }

            if (type == "RP_MC_FEE_PHAITHU_TRA")
               {
                Rpt_MC_TONGHOPFEE_PHAITHU_TRA cry = new Rpt_MC_TONGHOPFEE_PHAITHU_TRA();
                    cry.SetDataSource(dt);
                    cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                    cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                    cry.SetParameterValue("Thoigian", thoiGian);
                    cry.SetParameterValue("Title", title);
                    crystalReportViewer1.ReportSource = cry;
               }
            if (type == "PHT_THUPHI")
            {
                Rpt_PHT_THUPHI cry = new Rpt_PHT_THUPHI();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("Title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "BC_AUTOPAYMENT_1")
            {
                Rpt_Auto_Payment_DSKHDangKy cry = new Rpt_Auto_Payment_DSKHDangKy();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "BC_AUTOPAYMENT_2")
            {
                Rpt_Auto_Payment_2 cry = new Rpt_Auto_Payment_2();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "BC_AUTOPAYMENT_3")
            {
                Rpt_Auto_Payment_Will_Process cry = new Rpt_Auto_Payment_Will_Process();
                cry.SetDataSource(dt);
                cry.SetParameterValue("Title2", title2);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "BC_CR_APP_HOLD_RELEASE")
               {
               Rp_Credit_App_Hold_Release cry = new Rp_Credit_App_Hold_Release();
                    cry.SetDataSource(dt);
                    //cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                    //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                    cry.SetParameterValue("Thoigian", thoiGian);
                    cry.SetParameterValue("Title", title);
                    crystalReportViewer1.ReportSource = cry;
               }
            if (type == "MC_Reconciliation_ATM_Pending")
            {
                rP_MC_Reconciliation_ATM_Pending cry = new rP_MC_Reconciliation_ATM_Pending();
                cry.SetDataSource(dt);
                //cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "Unbill_transaction_credit")
            {
                Rp_Unbill_transaction_credit cry = new Rp_Unbill_transaction_credit();
                cry.SetDataSource(dt);
                //cry.SetParameterValue("Ngayin", DateTime.Now.ToShortDateString());
                //cry.SetParameterValue("Gioin", DateTime.Now.ToLongTimeString());
                cry.SetParameterValue("Thoigian", thoiGian);
                cry.SetParameterValue("Thoigian2", thoigian2);
                cry.SetParameterValue("Title", title);
                cry.SetParameterValue("Name", name);
                cry.SetParameterValue("Card_nbr", card_nbr);
                cry.SetParameterValue("Acc_nbr", acc_nbr);
                cry.SetParameterValue("Status", status);
                cry.SetParameterValue("bill_total_debit_amt", bill_total_debit_amt);
                cry.SetParameterValue("unbill_total_debit_amt", unbill_total_debit_amt);
                cry.SetParameterValue("curr_auth", curr_auth);

                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "ACCOUNTING_REPORT")
            {
                Rpt_ACCOUNTING_REPORT cry = new Rpt_ACCOUNTING_REPORT();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "MC_TAX_Reversal")
            {
                rpt_MC_Report_TAX_Reversal cry = new rpt_MC_Report_TAX_Reversal();
                cry.SetDataSource(dt);
                cry.SetParameterValue("ThoiGian", thoiGian);
                cry.SetParameterValue("Thoigian2", thoigian2);
                cry.SetParameterValue("Title", title);
                crystalReportViewer1.ReportSource = cry;
            }
            if (type == "PHI_CHIET_KHAU_DAI_LY")
            {
                rpt_PHI_CHIET_KHAU_DAI_LY phi = new rpt_PHI_CHIET_KHAU_DAI_LY();
                phi.SetDataSource(dt);
                phi.SetParameterValue("title", title);
                phi.SetParameterValue("title2", title2);
                crystalReportViewer1.ReportSource = phi;
            }
        }
예제 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     Rpt_MC_R2 rpt = new Rpt_MC_R2();
     rpt.Site = this.Site;
     return rpt;
 }