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; }); }
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; }
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:绑定统计信息 }); }
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; }); }
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; }); }
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()); } }
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; }); }
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); }
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; }); }
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; }); }
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; }); }
/// <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); }
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; }); }
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; }); }
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; }); }
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; }); }
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; }); }
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; } }); }
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; }); }
private void tblUserGroupMenuDomainDataSource_LoadingData(object sender, LoadingDataEventArgs e) { //if (this.tblUserGroupMenuDomainDataSource.HasChanges) //{ // e.Cancel = true; // MessageBox.Show("請先完成儲存動作!"); //} }
private void apartmentDomainDataSource_LoadingData(object sender, LoadingDataEventArgs e) { e.LoadBehavior = System.ServiceModel.DomainServices.Client.LoadBehavior.RefreshCurrent; }
private void GuardDataSource_OnLoadingData(object sender, LoadingDataEventArgs e) { e.LoadBehavior = LoadBehavior.MergeIntoCurrent; }
private void SmsDataSourceOnLoadingData(object sender, LoadingDataEventArgs loadingDataEventArgs) { loadingDataEventArgs.LoadBehavior = LoadBehavior.MergeIntoCurrent; smsDataSource.FilterDescriptors.Clear(); smsDataSource.FilterDescriptors.Add(new FilterDescriptor("time", FilterOperator.IsGreaterThan, DateTime.Today)); }
void dataServiceDataSource_LoadingData(object sender, LoadingDataEventArgs e) { }