/// <summary> /// 查询分类属性 /// </summary> /// <param name="model"></param> /// <param name="PageSize"></param> /// <param name="PageIndex"></param> /// <param name="SortField"></param> /// <param name="callback"></param> public void QueryProductChannelPeriodPrice(ProductChannelPeriodPriceQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { ProductChannelPeriodPriceQueryFilter filter = model.ConvertVM <ProductChannelPeriodPriceQueryVM, ProductChannelPeriodPriceQueryFilter>(); filter.PagingInfo = new PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; restClient.QueryDynamicData(GetPeriodPriceRelativeUrl, filter, (obj, args) => { if (args.FaultsHandle()) { return; } if (!(args.Result == null || args.Result.Rows == null)) { foreach (var item in args.Result.Rows) { item.IsChecked = false; } } callback(obj, args); } ); }
private void dgProductChannelPeriodPriceQueryResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e) { ProductChannelInfoQueryFacade facade = new ProductChannelInfoQueryFacade(); var model = new ProductChannelPeriodPriceQueryVM { ChannelProductSysNo = _sysNo }; facade.QueryProductChannelPeriodPrice(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) => { var list = new List <dynamic>(); foreach (var row in args.Result.Rows) { list.Add(row); } this.dgProductChannelPeriodPriceQueryResult.ItemsSource = list; this.dgProductChannelPeriodPriceQueryResult.TotalCount = args.Result.TotalCount; }); }