Пример #1
0
        private void dgConfirmSuccessResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            if (!string.IsNullOrEmpty(successSysNoSplitString))
            {
                var queryVM = new SaleIncomeQueryVM();
                queryVM.OrderID        = successSysNoSplitString;
                queryVM.CreateDateFrom = null;
                queryVM.CreateDateTo   = null;
                facade.Query(queryVM, e.PageSize, e.PageIndex, e.SortField, result =>
                {
                    this.dgConfirmSuccessResult.ItemsSource = result.ResultList;
                    this.dgConfirmSuccessResult.TotalCount  = result.TotalCount;

                    var statistic = result.Statistic.Single(w => w.StatisticType == StatisticType.Total);

                    string msg = string.Format(ResSaleIncomeAutoConfirm.Message_SuccessStatisticInfo
                                               , ConstValue.Invoice_ToCurrencyString(statistic.OrderAmt)
                                               , ConstValue.Invoice_ToCurrencyString(statistic.IncomeAmt)
                                               , ConstValue.Invoice_ToCurrencyString(statistic.ShipPrice)
                                               , ConstValue.Invoice_ToCurrencyString(statistic.ReturnCash)
                                               , statistic.ReturnPoint
                                               , ConstValue.Invoice_ToCurrencyString(statistic.ToleranceAmt));
                    this.tbSuccessInfo.Text       = msg;
                    this.tbSuccessInfo.Visibility = Visibility.Visible;
                });
            }
        }
Пример #2
0
        private void dgSaleIncomeQueryResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            lastQueryVM.ByCustomer = (rbByCustomer.IsChecked ?? false) ? "1"
                : (rbByOrder.IsChecked ?? false) ? "2" : "0";

            soIncomeFacade.Query(lastQueryVM, e.PageSize, e.PageIndex, e.SortField,
                                 result =>
            {
                //绑定结果列表
                this.dgSaleIncomeQueryResult.ItemsSource = result.ResultList;
                this.dgSaleIncomeQueryResult.TotalCount  = result.TotalCount;

                svStatisticInfo.Visibility = Visibility.Collapsed;
                if (result.TotalCount > 0 && result.Statistic != null && result.Statistic.Count != 0)
                {
                    //显示统计信息
                    tbStatisticInfo.Text       = result.Statistic.ToStatisticText();
                    svStatisticInfo.Visibility = Visibility.Visible;
                }
                else
                {
                    tbStatisticInfo.Text            = string.Empty;
                    this.svStatisticInfo.Visibility = System.Windows.Visibility.Collapsed;
                }
            });
        }