Example #1
0
        private void DataGrid_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            PagingInfo pageInfo = new QueryFilter.Common.PagingInfo()
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };
            //IsShowCategory  GroupName="rbIsShowCategory"
            var _vmTmp = this.DataGrid.QueryCriteria as CountdownQueryFilterVM;

            _vmTmp.IsShowCategoryAll = null;
            _vmTmp.IsShowCategoryAll = rbIsShowCategoryAll.IsChecked;
            _vmTmp.IsShowCategory    = rbIsShowCategory.IsChecked;
            _vmTmp.PMUserName        = CPApplication.Current.LoginUser.DisplayName;
            _Facade.Query(_vmTmp, pageInfo, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                List <CountdownQueryResultVM> dataSource = DynamicConverter <CountdownQueryResultVM> .ConvertToVMList(args.Result.Rows);
                dataSource.ForEach(s =>
                                   { if (s.IsPromotionSchedule)
                                     {
                                         if (string.IsNullOrEmpty(s.SalesVolume))
                                         {
                                             s.SalesVolume = "--";
                                         }
                                     }
                                     else
                                     {
                                         if (string.IsNullOrEmpty(s.SalesVolume))
                                         {
                                             s.SalesVolume = "0";
                                         }
                                     } });
                DataGrid.ItemsSource = dataSource;
                DataGrid.TotalCount  = args.Result.TotalCount;
            });
        }
Example #2
0
 public CustomerVisitQueryVM()
 {
     PageInfo = new QueryFilter.Common.PagingInfo();
 }
Example #3
0
 public CSSetVM()
 {
     PageInfo = new QueryFilter.Common.PagingInfo();
 }