示例#1
0
        private void BindData()
        {
            OrderStatisticsQuery_UnderShop orderStatisticsQuery_UnderShop = new OrderStatisticsQuery_UnderShop();

            orderStatisticsQuery_UnderShop.BeginDate = this.BeginDate;
            orderStatisticsQuery_UnderShop.EndDate   = this.EndDate;
            orderStatisticsQuery_UnderShop.Top       = new int?(this.Top);
            orderStatisticsQuery_UnderShop.PageIndex = this.pager.PageIndex;
            orderStatisticsQuery_UnderShop.PageSize  = this.pager.PageSize;
            orderStatisticsQuery_UnderShop.SortOrder = SortAction.Desc;
            orderStatisticsQuery_UnderShop.SortBy    = "SaleAmountFee";
            orderStatisticsQuery_UnderShop.ShopLevel = new int?(2);
            orderStatisticsQuery_UnderShop.AgentId   = new int?(base.GetUrlIntParam("UserId"));
            Globals.EntityCoding(orderStatisticsQuery_UnderShop, true);
            DbQueryResult orderStatisticReport_UnderShop = ShopStatisticHelper.GetOrderStatisticReport_UnderShop(orderStatisticsQuery_UnderShop);

            this.pager.TotalRecords = orderStatisticReport_UnderShop.TotalRecords;
            this.rptList.DataSource = orderStatisticReport_UnderShop.Data;
            this.rptList.DataBind();
            System.Data.DataRow orderStatisticReportGlobalByAgentID = ShopStatisticHelper.GetOrderStatisticReportGlobalByAgentID(orderStatisticsQuery_UnderShop);
            this.FXOrderNumber   = base.GetFieldIntValue(orderStatisticReportGlobalByAgentID, "OrderNumber");
            this.BuyerNumber     = base.GetFieldIntValue(orderStatisticReportGlobalByAgentID, "BuyerNumber");
            this.FXSaleAmountFee = base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "SaleAmountFee").ToString("N2");
            this.FXBuyAvgPrice   = "0";
            if (base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "BuyerNumber") > 0m)
            {
                this.FXBuyAvgPrice = System.Math.Round(base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "SaleAmountFee") / base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "BuyerNumber"), 2).ToString("N2");
            }
            this.FXCommissionFee = base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "CommissionAmountFee").ToString("N2");
        }
        private void BindData()
        {
            OrderStatisticsQuery_UnderShop entity = new OrderStatisticsQuery_UnderShop {
                BeginDate = this.BeginDate,
                EndDate   = this.EndDate,
                Top       = new int?(this.Top),
                PageIndex = this.pager.PageIndex,
                PageSize  = this.pager.PageSize,
                SortOrder = SortAction.Desc,
                SortBy    = "SaleAmountFee",
                ShopLevel = 2,
                AgentId   = new int?(base.GetUrlIntParam("UserId"))
            };

            Globals.EntityCoding(entity, true);
            DbQueryResult result = ShopStatisticHelper.GetOrderStatisticReport_UnderShop(entity);

            this.pager.TotalRecords = result.TotalRecords;
            this.rptList.DataSource = result.Data;
            this.rptList.DataBind();
            DataRow orderStatisticReportGlobalByAgentID = ShopStatisticHelper.GetOrderStatisticReportGlobalByAgentID(entity);

            this.FXOrderNumber   = base.GetFieldIntValue(orderStatisticReportGlobalByAgentID, "OrderNumber");
            this.BuyerNumber     = base.GetFieldIntValue(orderStatisticReportGlobalByAgentID, "BuyerNumber");
            this.FXSaleAmountFee = base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "SaleAmountFee").ToString("N2");
            this.FXBuyAvgPrice   = "0";
            if (base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "BuyerNumber") > 0M)
            {
                this.FXBuyAvgPrice = Math.Round((decimal)(base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "SaleAmountFee") / base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "BuyerNumber")), 2).ToString("N2");
            }
            this.FXCommissionFee = base.GetFieldDecimalValue(orderStatisticReportGlobalByAgentID, "CommissionAmountFee").ToString("N2");
        }