private void CreationChart()
        {
            MemberChart.Clear();
            var         mgArray = new decimal[48];
            IGoodsOrder order   = new GoodsOrder(GlobalConfig.DB.FromType.Read);
            IList <KeyValuePair <int, int> > memberShopingChartList = order.GetOrderHalfHour(StartTime, OrderStates, SaleFilialeID, SalePlatformID);

            if (memberShopingChartList.Count > 0)
            {
                int count = 0;
                for (int i = 0; i < memberShopingChartList.Count; i++)
                {
                    count = count + memberShopingChartList[i].Key;
                }

                foreach (KeyValuePair <int, int> keyValuePair in memberShopingChartList)
                {
                    mgArray[keyValuePair.Value] = WebControl.CurrencyValue(keyValuePair.Key);
                }


                MemberChart.DataSource = mgArray;
                MemberChart.DataBind();

                MemberChart.ChartTitle.TextBlock.Text = StartTime.ToShortDateString() + "发生选择状态单总数为" + count + ",详细如下:";
            }
            else
            {
                MemberChart.ChartTitle.TextBlock.Text = "无发生数据";
            }
        }
        private void CreationChart()
        {
            MemberChart.Clear();
            var         mgArray = new decimal[12];
            IGoodsOrder order   = new GoodsOrder(GlobalConfig.DB.FromType.Read);
            var         memberShopingChartList = order.GetQueryOrderByFinancial(Year, (OrderState)OrderState, PayMode, CountryId, ProvinceId, CityId, GlobalConfig.KeepYear, SaleFilialeID, SalePlatformID);

            if (memberShopingChartList.Count > 0)
            {
                decimal count = memberShopingChartList.Aggregate <KeyValuePair <int, decimal>, decimal>(0, (current, t) => current + t.Value);

                foreach (var keyValuePair in memberShopingChartList)
                {
                    mgArray[keyValuePair.Key - 1] = WebControl.CurrencyValue(keyValuePair.Value);
                }
                MemberChart.DataSource = mgArray;
                MemberChart.DataBind();
                MemberChart.ChartTitle.TextBlock.Text = "当前条件订单总金额" + WebControl.CurrencyValue(count) + ",详细如下:";
                //ChartSeries memberChart = MemberChart.Series.GetSeries(0);
                //ChartSeries nullChare = MemberChart.Series.GetSeries(1);
                //memberChart.Name = "订单发生额";
                //nullChare.Name = "";
            }
            else
            {
                MemberChart.ChartTitle.TextBlock.Text = "无发生数据";
            }
        }
Ejemplo n.º 3
0
        private void CreationChart()
        {
            MemberChart.Clear();
            CompleteOrders = 0;
            CancelOrders   = 0;
            int[,] mgArray;
            IList <KeyValuePair <int, int> > memberChartList;
            IList <KeyValuePair <int, int> > goodorderchartcancellation;

            if (String.IsNullOrEmpty(RCB_Month.SelectedValue))
            {
                //按年(每月)
                mgArray                               = new int[12, 2];
                memberChartList                       = _goodsOrder.GetGoodOrderChart(new[] { OrderState.Consignmented }, NonceYear, GlobalConfig.KeepYear, SaleFilialeID, SalePlatformID);
                goodorderchartcancellation            = _goodsOrder.GetGoodOrderChart(new[] { OrderState.Cancellation }, NonceYear, GlobalConfig.KeepYear, SaleFilialeID, SalePlatformID);
                MemberChart.ChartTitle.TextBlock.Text = NonceYear.Year + "年订单增量报告";
            }
            else
            {
                //按月(每天)
                mgArray                               = new int[DateTime.DaysInMonth(NonceYear.Year, NonceYear.Month), 2];
                memberChartList                       = _goodsOrder.GetGoodOrderChartDay(new[] { OrderState.Consignmented }, NonceYear, GlobalConfig.KeepYear, SaleFilialeID, SalePlatformID);
                goodorderchartcancellation            = _goodsOrder.GetGoodOrderChartDay(new[] { OrderState.Cancellation }, NonceYear, GlobalConfig.KeepYear, SaleFilialeID, SalePlatformID);
                MemberChart.ChartTitle.TextBlock.Text = NonceYear.Year + "年" + NonceYear.Month + "月订单增量报告";
            }
            int completeOrders = 0; //完成总数
            int cancelOrders   = 0; //取消总数

            //完成数
            foreach (KeyValuePair <int, int> keyValuePair in memberChartList)
            {
                mgArray[keyValuePair.Key - 1, 0] = keyValuePair.Value;
                completeOrders += keyValuePair.Value;
            }
            //作废数
            foreach (KeyValuePair <int, int> keyValuePair in goodorderchartcancellation)
            {
                mgArray[keyValuePair.Key - 1, 1] = keyValuePair.Value;
                cancelOrders += keyValuePair.Value;
            }
            CompleteOrders = completeOrders;
            CancelOrders   = cancelOrders;

            MemberChart.DataSource = mgArray;
            MemberChart.DataBind();
        }
Ejemplo n.º 4
0
        private void CreationChart()
        {
            MemberChart.Clear();
            IGoodsOrder goodsOrder = new GoodsOrder(GlobalConfig.DB.FromType.Read);
            IList <KeyValuePair <int, double> > memberShopingChartList = goodsOrder.GetOrderAmountRecord(ProvinceId, CityId, StartTime, Endtime, PayMode, OrderState, 1, ShowMode, GlobalConfig.KeepYear, SaleFilialeId, SalePlatformId);

            if (memberShopingChartList.Count > 0)
            {
                var count = memberShopingChartList.Aggregate(0, (current, t) => current + t.Key);
                MemberChart.DataSource = memberShopingChartList;
                MemberChart.ChartTitle.TextBlock.Text = StartTime.ToShortDateString() + "到" + Endtime.ToShortDateString() + "订单总数为" + count + ",详细如下:";
                MemberChart.DataBind();
            }
            else
            {
                MemberChart.ChartTitle.TextBlock.Text = "无发生数据";
            }
        }