Exemplo n.º 1
0
        private void dgGiftProductLog_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            SaleGiftFacade facade = new SaleGiftFacade(CPApplication.Current.CurrentPage);
            SaleGiftLogQueryFilterViewModel model = new SaleGiftLogQueryFilterViewModel();

            model.ProductSysNo = ProductSysNo;
            model.PageInfo     = new QueryFilter.Common.PagingInfo()
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };

            facade.QueryLog(model, (obj, args) =>
            {
                var list = new List <dynamic>();
                foreach (var row in args.Result.Rows)
                {
                    list.Add(row);
                }

                this.dgGiftProductLog.ItemsSource = list;
                this.dgGiftProductLog.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 2
0
        void DataGridSample_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            var data = m_soList.Skip(e.PageSize * e.PageIndex).Take(e.PageSize);

            DataGridSample.ItemsSource = data;
            DataGridSample.TotalCount  = m_soList.Count;
        }
Exemplo n.º 3
0
 private void dgPOSPayQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     m_POSPayFacade.QueryPOSPayConfirmList(lastQueryVM, e.PageSize, e.PageIndex, e.SortField,
                                           (result) =>
     {
         //绑定查询结果列表
         this.dgPOSPayQueryResult.ItemsSource = result.ResultList;
         this.dgPOSPayQueryResult.TotalCount  = result.TotalCount;
         this.IsShowTotalInfo = Visibility.Visible;
         if (result.Statistic != null &&
             result.Statistic.Count > 0)
         {
             POSPayQueryStatisticVM totalForAll  = result.Statistic.FirstOrDefault(item => item.StatisticType == StatisticType.Total);
             POSPayQueryStatisticVM totalForPage = result.Statistic.FirstOrDefault(item => item.StatisticType == StatisticType.Page);
             totalForAll       = totalForAll ?? new POSPayQueryStatisticVM();
             totalForPage      = totalForPage ?? new POSPayQueryStatisticVM();
             this.TotalForAll  = totalForAll;
             this.TotalForPage = totalForPage;
         }
         else
         {
             //Window.Alert("Warning", "搞毛线,没有数据");
             Window.Alert("Warning", ResPOSPayQuery.Msg_HaveNoData);
         }
         //TODO:绑定统计信息
     });
 }
Exemplo n.º 4
0
        private void dataGridSOLog_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            SOLogQueryFilter query = new SOLogQueryFilter();

            query.SOSysNo    = SOSysNo;
            query.PagingInfo = new PagingInfo()
            {
                PageSize  = e.PageSize,
                PageIndex = e.PageIndex,
                SortBy    = e.SortField
            };
            SOQueryFacade facade = new SOQueryFacade();

            facade.QuerySOSystemLog(query, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                dataGridSOLog.TotalCount = args.Result.TotalCount;

                var list = args.Result.Rows;
                foreach (var item in list)
                {
                    //note需要特殊处理
                    item["Note"] = GetSOLogNote((string)item["Note"]);
                }
                dataGridSOLog.ItemsSource = list;
            });
        }
Exemplo n.º 5
0
        private void dgVirtualRequestQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            queryFilter.PagingInfo = new QueryFilter.Common.PagingInfo()
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };

            //if (!queryFilter.ProductSysNo.HasValue
            //    || !queryFilter.StartDate.HasValue)
            //{
            //    Window.Alert("商品编号和申请时间不能为空!");
            //    return;
            //}

            serviceFacade.QueryVirtualRequest(queryFilter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                var getList    = args.Result.Rows.ToList("IsChecked", false);
                int totalCount = args.Result.TotalCount;
                this.dgVirtualRequestQueryResult.ItemsSource = getList;
                this.dgVirtualRequestQueryResult.TotalCount  = totalCount;
            });
        }
Exemplo n.º 6
0
        protected void batchdg_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            if (query == null || !this.IsBatch)
            {
                return;
            }
            PagingInfo pageing = new PagingInfo
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };


            query.PagingInfo = pageing;
            query.StockSysNo = Convert.ToInt32(filterVM.StockSysNo);
            if (!string.IsNullOrEmpty(filterVM.ProductSysNo))
            {
                query.ProductSysNo = Convert.ToInt32(filterVM.ProductSysNo);
            }


            facade.QueryProductBatchInfo(query, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                BindDataGrid(args.Result.TotalCount, args.Result.Rows);
            });
        }
		private void OnDataSourceLoadingData(object sender, LoadingDataEventArgs e)
		{
			this.startTime = DateTime.Now;
			if (e.Query != null)
			{
				this.debugTextBox.Text = string.Format("--> Requesting {0}\r\n", e.Query.ToString());
			}
		}
Exemplo n.º 8
0
 private void dgNetPayQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     facade.Query(lastQueryVM, e.PageSize, e.PageIndex, e.SortField, result =>
     {
         this.dgNetPayQueryResult.ItemsSource = result.ResultList;
         this.dgNetPayQueryResult.TotalCount  = result.TotalCount;
     });
 }
Exemplo n.º 9
0
 private void dataRMARefundList_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     facade.Query(this.dataRMARefundList.QueryCriteria as RefundQueryReqVM, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
     {
         this.dataRMARefundList.ItemsSource = args.Result.Rows;
         this.dataRMARefundList.TotalCount  = args.Result.TotalCount;
     });
 }
        protected void DomainDataSourceLoadingData(object sender, LoadingDataEventArgs e)
        {
            this._ddsLoadingData++;
            string messagePrefix = !string.IsNullOrEmpty(this._asyncEventFailureMessage) ? this._asyncEventFailureMessage + "; " : "";

            Assert.IsTrue(this._ddsLoadingData <= this._ddsLoadingDataExpected,
                          messagePrefix + "There should only be {0} LoadingData events.", this._ddsLoadingDataExpected);
        }
Exemplo n.º 11
0
 void BrandRequestResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     facade.GetAllBrandRequest(e.PageSize, e.PageIndex, e.SortField, (obj, arg) =>
     {
         this.BrandRequestResult.ItemsSource = arg.Result.Rows;
         this.BrandRequestResult.TotalCount  = arg.Result.TotalCount;
     });
 }
Exemplo n.º 12
0
        void CategoryRequestApprovalResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            CategoryRequestApprovalFacade facade = new CategoryRequestApprovalFacade();

            facade.GetCategoryRequestApprovalList(model, e.PageSize, e.PageIndex, e.SortField, (obj, arg) =>
            {
                this.CategoryRequestApprovalResult.ItemsSource = arg.Result.Rows;
                this.CategoryRequestApprovalResult.TotalCount  = arg.Result.TotalCount;
            });
        }
        void QueryPriceChangeLogQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            ProductQueryPriceChangeLogFacade facade = new ProductQueryPriceChangeLogFacade();

            facade.GetProductQueryPriceChangeLog(model, e.PageSize, e.PageIndex, e.SortField, (obj, arg) =>
            {
                this.QueryPriceChangeLogQueryResult.ItemsSource = arg.Result.Rows;
                this.QueryPriceChangeLogQueryResult.TotalCount  = arg.Result.TotalCount;
            });
        }
Exemplo n.º 14
0
        private void resultgd_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            facade.QueryPriceChange(this.queryVM, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                this.resultCollection = new ObservableCollection <PriceChangeVM>(DynamicConverter <PriceChangeVM> .ConvertToVMList(args.Result.Rows.ToList("IsChecked", false)));

                this.resultgd.ItemsSource = this.resultCollection;
                this.resultgd.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 15
0
 /// <summary>
 /// 销售规则数据绑定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgSaleRuleQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     _model.PageInfo = new PagingInfo
     {
         PageSize  = e.PageSize,
         PageIndex = e.PageIndex,
         SortBy    = e.SortField
     };
     ThreadPool.QueueUserWorkItem(BindSaleRuleQueryResult, _model);
 }
Exemplo n.º 16
0
        private void dgManufacturerQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            ManufacturerQueryFacade facade = new ManufacturerQueryFacade(this);

            facade.QueryManufacturer(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                this.dgManufacturerQueryResult.ItemsSource = args.Result.Rows;
                this.dgManufacturerQueryResult.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 17
0
        private void dgAccessoryQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            AccessoryQueryFacade facade = new AccessoryQueryFacade(this);

            facade.QueryAccessory(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                _vmList = DynamicConverter <AccessoryVM> .ConvertToVMList <List <AccessoryVM> >(args.Result.Rows);
                this.dgAccessoryQueryResult.ItemsSource = _vmList;
                this.dgAccessoryQueryResult.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 18
0
 private void productreqgd_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     _facade.QueryGiftVoucherProductRelationReq(new GiftCardProductFilterVM {
         SysNo = RequestSysNo
     }, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
     {
         ObservableCollection <GiftVoucherProductRelationReqVM> coll = DynamicConverter <GiftVoucherProductRelationReqVM> .ConvertToVMList <ObservableCollection <GiftVoucherProductRelationReqVM> >(args.Result.Rows);
         this.productreqgd.ItemsSource = coll;
         this.productreqgd.TotalCount  = args.Result.TotalCount;
     });
 }
Exemplo n.º 19
0
        private void dgProductGroupQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            ProductGroupFacade facade = new ProductGroupFacade(this);

            facade.QueryProductGroupInfo(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                _vmList = DynamicConverter <ProductGroupVM> .ConvertToVMList <List <ProductGroupVM> >(args.Result.Rows);
                this.dgProductGroupQueryResult.ItemsSource = _vmList;
                this.dgProductGroupQueryResult.TotalCount  = args.Result.TotalCount;
            });
        }
        private void dgCategoryAccessoryQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            CategoryAccessoriesQueryFacade facade = new CategoryAccessoriesQueryFacade(this);

            model = (CategoryAccessoriesQueryVM)this.DataContext;
            facade.QueryCategoryAccessories(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                this.dgCategoryAccessoryQueryResult.ItemsSource = args.Result.Rows;
                this.dgCategoryAccessoryQueryResult.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 21
0
        private void dgQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            List <TariffInfoVM> _vmList = new List <TariffInfoVM>();

            m_facade.TariffInfoQuery(VM, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                _vmList = DynamicConverter <TariffInfoVM> .ConvertToVMList <List <TariffInfoVM> >(args.Result.Rows);
                this.dgQueryResult.ItemsSource = _vmList;
                this.dgQueryResult.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 22
0
 private void QueryResultGrid_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     PageQueryFacade.QueryStockAgeReport(PageQueryView, e.PageIndex, e.PageSize, e.SortField, (obj, args) =>
     {
         if (args.Result != null && args.Result.Rows != null)
         {
             this.QueryResultGrid.ItemsSource = args.Result.Rows;
             this.QueryResultGrid.TotalCount  = args.Result.TotalCount;
         }
     });
 }
Exemplo n.º 23
0
 void dgRmaPolicyQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
 {
     facade.QueryRmaPolicy(QueryVM, e.PageSize, e.PageIndex, e.SortField, (obj, arg) => {
         if (arg.FaultsHandle())
         {
             return;
         }
         this.dgRmaPolicyQueryResult.ItemsSource = arg.Result.Rows.ToList("IsChecked", false);
         this.dgRmaPolicyQueryResult.TotalCount  = arg.Result.TotalCount;
     });
 }
Exemplo n.º 24
0
        private void tblUserGroupMenuDomainDataSource_LoadingData(object sender, LoadingDataEventArgs e)
        {
            //if (this.tblUserGroupMenuDomainDataSource.HasChanges)
            //{
            //    e.Cancel = true;
            //    MessageBox.Show("請先完成儲存動作!");
            //}

        }
Exemplo n.º 25
0
 private void apartmentDomainDataSource_LoadingData(object sender, LoadingDataEventArgs e)
 {
     e.LoadBehavior = System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent;
 }
Exemplo n.º 26
0
 private void GuardDataSource_OnLoadingData(object sender, LoadingDataEventArgs e)
 {
     e.LoadBehavior = LoadBehavior.MergeIntoCurrent;
 }
Exemplo n.º 27
0
 private void SmsDataSourceOnLoadingData(object sender, LoadingDataEventArgs loadingDataEventArgs)
 {
     loadingDataEventArgs.LoadBehavior = LoadBehavior.MergeIntoCurrent;
     smsDataSource.FilterDescriptors.Clear();
     smsDataSource.FilterDescriptors.Add(new FilterDescriptor("time", FilterOperator.IsGreaterThan, DateTime.Today));
 }
Exemplo n.º 28
0
 void dataServiceDataSource_LoadingData(object sender, LoadingDataEventArgs e)
 {
 }