private void LoadData() { DateTime today = DateTime.Today; DateTime recDate = today.AddDays(-1.0); DataRow drOne = ShopStatisticHelper.Distributor_GetGlobal(today); if (drOne != null) { this.SaleAmountFee = base.GetFieldDecimalValue(drOne, "ValidOrderTotal"); this.FXValidOrderTotal = base.GetFieldDecimalValue(drOne, "FXValidOrderTotal"); this.FXOrderNumber = base.GetFieldIntValue(drOne, "FXOrderNumber"); this.FXCommissionFee = base.GetFieldDecimalValue(drOne, "FXSumCommission"); this.FXResultPercent = 0M; if ((this.SaleAmountFee > 0M) && (this.FXValidOrderTotal > 0M)) { this.FXResultPercent = Convert.ToDecimal((decimal)((this.FXValidOrderTotal / this.SaleAmountFee) * 100M)); } } drOne = ShopStatisticHelper.Distributor_GetGlobal(recDate); if (drOne != null) { this.SaleAmountFee_Yesterday = base.GetFieldDecimalValue(drOne, "ValidOrderTotal"); this.FXValidOrderTotal_Yesterday = base.GetFieldDecimalValue(drOne, "FXValidOrderTotal"); this.FXOrderNumber_Yesterday = base.GetFieldIntValue(drOne, "FXOrderNumber"); this.FXCommissionFee_Yesterday = base.GetFieldDecimalValue(drOne, "FXSumCommission"); this.FXResultPercent_Yesterday = 0M; if ((this.SaleAmountFee_Yesterday > 0M) && (this.FXValidOrderTotal_Yesterday > 0M)) { this.FXResultPercent_Yesterday = Convert.ToDecimal((decimal)((this.FXValidOrderTotal_Yesterday / this.SaleAmountFee_Yesterday) * 100M)); } } drOne = ShopStatisticHelper.Distributor_GetGlobalTotal(recDate); if (drOne != null) { this.AgentNumber = base.GetFieldIntValue(drOne, "DistributorNumber"); this.NewAgentNumber_Yesterday = base.GetFieldIntValue(drOne, "NewAgentNumber"); this.FinishedDrawCommissionFee = base.GetFieldDecimalValue(drOne, "FinishedDrawCommissionFee"); this.WaitDrawCommissionFee = base.GetFieldDecimalValue(drOne, "WaitDrawCommissionFee"); } }
private void LoadData() { System.DateTime today = System.DateTime.Today; System.DateTime dateTime = today.AddDays(-1.0); System.Data.DataRow dataRow = ShopStatisticHelper.Distributor_GetGlobal(today); if (dataRow != null) { this.SaleAmountFee = base.GetFieldDecimalValue(dataRow, "ValidOrderTotal"); this.FXValidOrderTotal = base.GetFieldDecimalValue(dataRow, "FXValidOrderTotal"); this.FXOrderNumber = base.GetFieldIntValue(dataRow, "FXOrderNumber"); this.FXCommissionFee = base.GetFieldDecimalValue(dataRow, "FXSumCommission"); this.FXResultPercent = 0m; if (this.SaleAmountFee > 0m && this.FXValidOrderTotal > 0m) { this.FXResultPercent = System.Convert.ToDecimal(this.FXValidOrderTotal / this.SaleAmountFee * 100m); } } dataRow = ShopStatisticHelper.Distributor_GetGlobal(dateTime); if (dataRow != null) { this.SaleAmountFee_Yesterday = base.GetFieldDecimalValue(dataRow, "ValidOrderTotal"); this.FXValidOrderTotal_Yesterday = base.GetFieldDecimalValue(dataRow, "FXValidOrderTotal"); this.FXOrderNumber_Yesterday = base.GetFieldIntValue(dataRow, "FXOrderNumber"); this.FXCommissionFee_Yesterday = base.GetFieldDecimalValue(dataRow, "FXSumCommission"); this.FXResultPercent_Yesterday = 0m; if (this.SaleAmountFee_Yesterday > 0m && this.FXValidOrderTotal_Yesterday > 0m) { this.FXResultPercent_Yesterday = System.Convert.ToDecimal(this.FXValidOrderTotal_Yesterday / this.SaleAmountFee_Yesterday * 100m); } } dataRow = ShopStatisticHelper.Distributor_GetGlobalTotal(dateTime); if (dataRow != null) { this.AgentNumber = base.GetFieldIntValue(dataRow, "DistributorNumber"); this.NewAgentNumber_Yesterday = base.GetFieldIntValue(dataRow, "NewAgentNumber"); this.FinishedDrawCommissionFee = base.GetFieldDecimalValue(dataRow, "FinishedDrawCommissionFee"); this.WaitDrawCommissionFee = base.GetFieldDecimalValue(dataRow, "WaitDrawCommissionFee"); } }