示例#1
0
        private void BindData()
        {
            OrderStatisticsQuery entity = new OrderStatisticsQuery {
                BeginDate = this.BeginDate,
                EndDate   = this.EndDate,
                Top       = new int?(this.Top),
                PageIndex = this.pager.PageIndex,
                PageSize  = this.pager.PageSize,
                SortOrder = SortAction.Desc,
                SortBy    = "SaleAmountFee",
                wid       = this.wid
            };

            Globals.EntityCoding(entity, true);
            DbQueryResult orderStatisticReport = ShopStatisticHelper.GetOrderStatisticReport(entity);
            DateTime      beginDate            = DateTime.Today.AddDays(-7.0);

            if (this.txtBeginDate.TextToDate.HasValue)
            {
                beginDate = this.txtBeginDate.TextToDate.Value;
            }
            DateTime now = DateTime.Now;

            if (this.txtEndDate.TextToDate.HasValue)
            {
                now = this.txtEndDate.TextToDate.Value;
            }
            DataRow drOne = ShopStatisticHelper.GetOrder_Member_CountInfo(beginDate, now, this.wid);

            this.OrderNumber     = base.GetFieldIntValue(drOne, "OrderNumber");
            this.SaleAmountFee   = base.GetFieldDecimalValue(drOne, "SaleAmountFee").ToString("N2");
            this.FXOrderNumber   = base.GetFieldIntValue(drOne, "FXOrderNumber");
            this.FXSaleAmountFee = base.GetFieldDecimalValue(drOne, "FXSaleAmountFee").ToString("N2");
            this.FXResultPercent = "0";
            if (base.GetFieldDecimalValue(drOne, "SaleAmountFee") > 0M)
            {
                this.FXResultPercent = Math.Round((decimal)((base.GetFieldDecimalValue(drOne, "FXSaleAmountFee") / base.GetFieldDecimalValue(drOne, "SaleAmountFee")) * 100M), 2).ToString("N2");
            }
            this.FXCommissionFee    = base.GetFieldDecimalValue(drOne, "FXCommissionFee").ToString("N2");
            this.rptList.DataSource = orderStatisticReport.Data;
            this.rptList.DataBind();
            this.pager.TotalRecords = orderStatisticReport.TotalRecords;
        }
示例#2
0
        private void BindData()
        {
            OrderStatisticsQuery orderStatisticsQuery = new OrderStatisticsQuery();

            orderStatisticsQuery.BeginDate = this.BeginDate;
            orderStatisticsQuery.EndDate   = this.EndDate;
            orderStatisticsQuery.Top       = new int?(this.Top);
            orderStatisticsQuery.PageIndex = this.pager.PageIndex;
            orderStatisticsQuery.PageSize  = this.pager.PageSize;
            orderStatisticsQuery.SortOrder = SortAction.Desc;
            orderStatisticsQuery.SortBy    = "SaleAmountFee";
            Globals.EntityCoding(orderStatisticsQuery, true);
            DbQueryResult orderStatisticReport = ShopStatisticHelper.GetOrderStatisticReport(orderStatisticsQuery);

            System.DateTime beginDate = System.DateTime.Today.AddDays(-6.0);
            if (this.txtBeginDate.TextToDate.HasValue)
            {
                beginDate = this.txtBeginDate.TextToDate.Value;
            }
            System.DateTime endDate = System.DateTime.Now;
            if (this.txtEndDate.TextToDate.HasValue)
            {
                endDate = this.txtEndDate.TextToDate.Value;
            }
            System.Data.DataRow order_Member_CountInfo = ShopStatisticHelper.GetOrder_Member_CountInfo(beginDate, endDate);
            this.OrderNumber     = base.GetFieldIntValue(order_Member_CountInfo, "OrderNumber");
            this.SaleAmountFee   = base.GetFieldDecimalValue(order_Member_CountInfo, "SaleAmountFee").ToString("N2");
            this.FXOrderNumber   = base.GetFieldIntValue(order_Member_CountInfo, "FXOrderNumber");
            this.FXSaleAmountFee = base.GetFieldDecimalValue(order_Member_CountInfo, "FXSaleAmountFee").ToString("N2");
            this.FXResultPercent = "0";
            if (base.GetFieldDecimalValue(order_Member_CountInfo, "SaleAmountFee") > 0m)
            {
                this.FXResultPercent = System.Math.Round(base.GetFieldDecimalValue(order_Member_CountInfo, "FXSaleAmountFee") / base.GetFieldDecimalValue(order_Member_CountInfo, "SaleAmountFee") * 100m, 2).ToString("N2");
            }
            this.FXCommissionFee    = base.GetFieldDecimalValue(order_Member_CountInfo, "FXCommissionFee").ToString("N2");
            this.rptList.DataSource = orderStatisticReport.Data;
            this.rptList.DataBind();
            this.pager.TotalRecords = orderStatisticReport.TotalRecords;
        }