Beispiel #1
0
        public ActionResult CurrentTpFilter(int[] rsMid, int[] asMid, int[] cEid, int[] id, DateTime startDate, DateTime endDate)
        {
            string dbids = sp.Dbids(rsMid, asMid, cEid, id);

            var data = Db.RPT_Realtime_TradepromotionDetails(startDate, endDate, dbids).ToList();

            return(PartialView("CurrentTp/CurrentTpFilter", data));
        }
Beispiel #2
0
        public ActionResult ROrderVsDeliveryFilter(int[] rsMid, int[] asMid, int[] cEid, int[] id, int[] skuIds, DateTime startDate, DateTime endDate, int reportType, int parformerType)
        {
            string dbids   = sp.Dbids(rsMid, asMid, cEid, id);
            string skulist = null;

            if (skuIds != null)
            {
                skulist = string.Join(",", skuIds);
            }



            if (parformerType == 1)  // by DB
            {
                if (reportType == 1) //DB Summery
                {
                    List <RPT_Realtime_OrderVsdeliveredDBSummary_Result> orderVsDeleviry = Db
                                                                                           .RPT_Realtime_OrderVsdeliveredDBSummary(startDate, endDate, dbids, skulist)
                                                                                           .ToList();


                    return(PartialView("ROrderVsDelivery/OrderVsdeliveredDBSummary", orderVsDeleviry));
                }
                else if (reportType == 2) // DB Details
                {
                    List <RPT_Realtime_OrderVsdeliveredDBDetails_Result> orderVsDeleviry = Db
                                                                                           .RPT_Realtime_OrderVsdeliveredDBDetails(startDate, endDate, dbids, skulist)
                                                                                           .ToList();


                    return(PartialView("ROrderVsDelivery/OrderVsdeliveredDBDetails", orderVsDeleviry));
                }
            }
            else if (parformerType == 2) // by PSR
            {
                if (reportType == 1)     //PSR Summery
                {
                    List <RPT_Realtime_OrderVsdeliveredSummary_Result> orderVsDeleviry = Db
                                                                                         .RPT_Realtime_OrderVsdeliveredSummary(startDate, endDate, dbids, skulist)
                                                                                         .ToList();


                    return(PartialView("ROrderVsDelivery/RPSRROrderVsDeliveryFilter", orderVsDeleviry));
                }
                else if (reportType == 2) // PSR Details
                {
                    List <RPT_Realtime_OrderVsdeliveredDetails_Result> orderVsDeleviry = Db
                                                                                         .RPT_Realtime_OrderVsdeliveredDetails(startDate, endDate, dbids, skulist)
                                                                                         .ToList();


                    return(PartialView("ROrderVsDelivery/OrderVsdeliveredDetails", orderVsDeleviry));
                }
            }

            return(null);
        }
Beispiel #3
0
        public ActionResult ShowAllDbLifting(int[] rsMid, int[] asMid, int[] cEid, int[] id, DateTime startDate, DateTime endDate)
        {
            string dbids = sp.Dbids(rsMid, asMid, cEid, id);

            var dbLifting = Db.RPT_Realtime_DBLifting(startDate, endDate, dbids).ToList();

            return(PartialView(dbLifting));
        }
Beispiel #4
0
        public ActionResult RptOutletWiseOrderFilter(int[] rsMid, int[] asMid, int[] cEid, int[] id, int[] skuIds, DateTime startDate, DateTime endDate, int reportType)
        {
            string dbids   = sp.Dbids(rsMid, asMid, cEid, id);
            string skulist = null;

            if (skuIds != null)
            {
                skulist = string.Join(",", skuIds);
            }

            ReportViewer reportViewer = new ReportViewer
            {
                ProcessingMode      = ProcessingMode.Local,
                SizeToReportContent = true,
                Width  = Unit.Percentage(100),
                Height = Unit.Pixel(600)
            };

            List <RPT_Order_OutletWiseSKUWiseOrder_Result> outletOrder = Dbbi
                                                                         .RPT_Order_OutletWiseSKUWiseOrder(startDate, endDate, dbids, skulist)
                                                                         .ToList();

            if (reportType == 1)  //Summery
            {
                reportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reports\Order\RPT_OutletWiseOrder_Symmary.rdlc");
            }
            else if (reportType == 2) //Details
            {
                reportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reports\Order\RPT_OutletWiseOrder_Details.rdlc");
            }

            ReportDataSource rdc = new ReportDataSource("OutletOrder", outletOrder);

            reportViewer.LocalReport.DataSources.Add(rdc);
            reportViewer.LocalReport.Refresh();
            reportViewer.Visible = true;

            ViewBag.ReportViewer = reportViewer;

            return(PartialView("OutletWiseOrder/RptOutletWiseOrderFilter"));
        }
Beispiel #5
0
        public ActionResult RptOutletWiseDeliveryFilter(int[] rsMid, int[] asMid, int[] cEid, int[] id, int[] skuIds, DateTime startDate, DateTime endDate, int reportType)
        {
            string dbids   = sp.Dbids(rsMid, asMid, cEid, id);
            string skulist = null;

            if (skuIds != null)
            {
                skulist = string.Join(",", skuIds);
            }
            ReportViewer reportViewer = new ReportViewer
            {
                Visible = true,

                ProcessingMode      = ProcessingMode.Local,
                SizeToReportContent = true,
                Width  = Unit.Percentage(100),
                Height = Unit.Pixel(600)
            };

            List <RPT_Delivery_OutletWiseSKUWiseDelivery_Result> delivery = Dbbi
                                                                            .RPT_Delivery_OutletWiseSKUWiseDelivery(startDate, endDate, dbids, skulist).ToList();

            ReportParameter rp2 = null;

            if (reportType == 1)  //Summery
            {
                reportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reports\Delivery\RPT_Delivery_OutletWiseDeliverySummery.rdlc");
                rp2 = new ReportParameter("ReportNameParameter", "Outlet Wise Delivery [102] Summary");
            }
            else if (reportType == 2) //Details
            {
                reportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reports\Delivery\RPT_Delivery_OutletWiseDeliveryDetails.rdlc");
                rp2 = new ReportParameter("ReportNameParameter", "Outlet SKU Wise Delivery [102]");
            }
            ReportParameter  rp1 = new ReportParameter("DateParameter", startDate.ToString("dd-MMM-yyy") + " TO " + endDate.ToString("dd-MMM-yyy"));
            ReportDataSource rdc = new ReportDataSource("OutletDelivery", delivery);


            reportViewer.LocalReport.SetParameters(new[] { rp1, rp2 });

            reportViewer.LocalReport.DataSources.Add(rdc);

            reportViewer.LocalReport.Refresh();
            reportViewer.Visible = true;

            ViewBag.ReportViewer = reportViewer;

            return(PartialView("OutletWiseDelivery/RptOutletWiseDeliveryFilter"));
        }