Example #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptItemDept rpt = new rptItemDept();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     rptItemDept rpt = new rptItemDept();
     rpt.Site = this.Site;
     return rpt;
 }
Example #3
0
        private ReportClass ViewReport(int s)
        {
            //EnableDateTime();
            switch (s)
            {
                case 0:
                    {
                        if(DateTime2.Ticks<=DateTime1.Ticks)
                        {
                            Alert.Show("Nhập Ngày Sai.\n Nhập lại ngày",Color.Red);
                            return null;
                        }
                        string status = "";
                        if(StatusInvoice==Const.Invoice_Status.THANH_TOAN_ROI)
                        {
                            status = "Hóa đơn thanh toán";
                        }else if(StatusInvoice==Const.Invoice_Status.HUY)
                        {
                            status = "Hóa đơn hủy";
                        }
                        POSReport.Report.InvoiceTotal invoiceTotal = new POSReport.Report.InvoiceTotal();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID","HuyOrThanhToan" };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2,StatusInvoice,Cashier_ID,status};
                        test.FillDataReport(invoiceTotal, pa, value, true);
                        return invoiceTotal;
                    }
                    
                case 1:
                    {
                        string status = "";
                        if (StatusInvoice == Const.Invoice_Status.THANH_TOAN_ROI)
                        {
                            status = "Hóa đơn thanh toán";
                        }
                        else if (StatusInvoice == Const.Invoice_Status.HUY)
                        {
                            status = "Hóa đơn hủy";
                        }
                        POSReport.Report.rptInvoiceTotalsDaily invoiceTotalsDaily = new rptInvoiceTotalsDaily();
                        string[] pa = { "@Store_ID", "Report_Title_Param", "@Status", "@Cashier_ID", "HuyOrThanhToan" };
                        object[] value = { StaticClass.storeId, "Báo cáo hóa đơn theo từng ngày", StatusInvoice, Cashier_ID, status };
                        test.FillDataReport(invoiceTotalsDaily, pa, value, true);
                        return invoiceTotalsDaily;
                    }
                case 2:
                    {

                        POSReport.Report.rptDetailSaleReport DetailSaleReport = new rptDetailSaleReport();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID", "Report Title", };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2, StatusInvoice, Cashier_ID, "Báo cáo bán hàng chi tiết trong ngày" };
                        test.FillDataReport(DetailSaleReport, pa, value, true);
                        return DetailSaleReport;
                    }
                case 3:
                    {
                        POSReport.Report.rptReturn rptReturn = new rptReturn();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID", "Report_Title", };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2, StatusInvoice, Cashier_ID, "Báo cáo các mặt hàng trả lại" };
                        test.FillDataReport(rptReturn, pa, value, true);
                        return rptReturn;
                    }
                case 4:
                    {
                        POSReport.Report.rptItemDept invoice = new rptItemDept();
                        string[] pa = { "@Store_ID", "Report_Title_Param", "@Status", "@DateTime1", "@DateTime2" };
                        object[] value = { StaticClass.storeId, "Báo cáo chi tiết bán hàng theo nhóm", StatusInvoice, DateTime1, DateTime2 };
                        test.FillDataReport(invoice, pa, value, true);
                        return invoice;
                    }
                case 5:
                    {
                        POSReport.Report.rptItemDetail invoice = new rptItemDetail();
                        string[] pa = { "@Store_ID", "@ReportTitle", "@Status", "@DateTime1", "@DateTime2" };
                        object[] value = { StaticClass.storeId, "Báo cáo chi tiết bán hàng theo từng mặt hàng", StatusInvoice, DateTime1, DateTime2 };
                        test.FillDataReport(invoice, pa, value, true);
                        return invoice;
                    }

                case 40:
                    {
                        POSReport.Report.rptInventoryByApha rptInventoryByApha = new rptInventoryByApha();
                        string[] pa = { "@Store_ID", "Report_Title_Param" };
                        string[] value = { StaticClass.storeId, "Báo cáo tồn kho" };
                        test.FillDataReport(rptInventoryByApha, pa, value, true);
                        return rptInventoryByApha; 
                    }

                case 41:
                    {
                        POSReport.Report.rptReceivedItems invoice = new rptReceivedItems();
                        string[] pa = { "@DateTime1", "@DateTime2" };
                        object[] value = { DateTime1, DateTime2 };
                        test.FillDataReport(invoice, pa, value, true);
                        return invoice;
                    }
                case 42:
                    {
                        POSReport.Report.rptReOrderReport report = new rptReOrderReport();
                        string[] pa = { "@Store_ID" };
                        object[] value = { StaticClass.storeId };
                        test.FillDataReport(report, pa, value, true);
                        return report;
                    }
                default:
                    return null;
            }     

        }
Example #4
0
        private ReportClass ViewReport(int s)
        {
            EnableDateTime();
            switch (s)
            {
                case 0:
                    {
                        if(DateTime2.Ticks<=DateTime1.Ticks)
                        {
                            Alert.Show("Nhập Ngày Sai.\n Nhập lại ngày",Color.Red);
                            return null;
                        }
                        POSReport.Report.InvoiceTotal invoiceTotal = new POSReport.Report.InvoiceTotal();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID" };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2,StatusInvoice,Cashier_ID};
                        test.FillDataReport(invoiceTotal, pa, value, true);
                        return invoiceTotal;
                    }
                    
                case 1:
                    {
                        POSReport.Report.rptInvoiceTotalsDaily invoiceTotalsDaily = new rptInvoiceTotalsDaily();
                        string[] pa = { "@Store_ID", "Report_Title_Param", "@Status", "@Cashier_ID" };
                        object[] value = { StaticClass.storeId, "Báo cáo hóa đơn theo từng ngày", StatusInvoice, Cashier_ID };
                        test.FillDataReport(invoiceTotalsDaily, pa, value, true);
                        return invoiceTotalsDaily;
                    }
                case 2:
                    {

                        POSReport.Report.rptDetailSaleReport DetailSaleReport = new rptDetailSaleReport();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID", "Report Title", };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2, StatusInvoice, Cashier_ID, "Báo cáo bán hàng chi tiết trong ngày" };
                        test.FillDataReport(DetailSaleReport, pa, value, true);
                        return DetailSaleReport;
                    }
                case 3:
                    {
                        POSReport.Report.rptReturn rptReturn = new rptReturn();
                        string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID", "Report_Title", };
                        object[] value = { StaticClass.storeId, DateTime1, DateTime2, StatusInvoice, Cashier_ID, "Báo cáo các mặt hàng trả lại" };
                        test.FillDataReport(rptReturn, pa, value, true);
                        return rptReturn;
                    }
                case 4:
                    {
                        POSReport.Report.rptItemDept invoice = new rptItemDept();
                        string[] pa = { "@Store_ID", "Report_Title_Param", "@Status" };
                        string[] value = { StaticClass.storeId, "Báo cáo chi tiết bán hàng theo nhóm", StatusInvoice };
                        test.FillDataReport(invoice, pa, value, true);
                        return invoice;
                    }
                case 40:
                    {
                        POSReport.Report.rptInventoryByApha rptInventoryByApha = new rptInventoryByApha();
                        string[] pa = { "@Store_ID", "Report_Title_Param" };
                        string[] value = { StaticClass.storeId, "Tình hình các mặt hàng trong kho" };
                        test.FillDataReport(rptInventoryByApha, pa, value, true);
                        return rptInventoryByApha; 
                    }

                //case 41:
                //    {
                //        POSReport.Report.rptItemDept invoice = new rptItemDept();
                //        string[] pa = { "@Store_ID", "Report_Title_Param", "@Status"};
                //        string[] value = { StaticClass.storeId, "Báo cáo chi tiết bán hàng theo nhóm",StatusInvoice};
                //        test.FillDataReport(invoice, pa, value, true);
                //        return invoice;
                //    }

                default:
                    return null;
            }     

        }