/// <summary> /// 查询分类属性 /// </summary> /// <param name="model"></param> /// <param name="PageSize"></param> /// <param name="PageIndex"></param> /// <param name="SortField"></param> /// <param name="callback"></param> public void QueryCategoryExtendWarrantyDisuseBrand(CategoryExtendWarrantyDisuseBrandQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { CategoryExtendWarrantyDisuseBrandQueryFilter filter = model.ConvertVM <CategoryExtendWarrantyDisuseBrandQueryVM, CategoryExtendWarrantyDisuseBrandQueryFilter>(); filter.PagingInfo = new PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; restClient.QueryDynamicData(GetDisuseBrandRelativeUrl, 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); } ); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); model = new CategoryExtendWarrantyQueryVM(); this.expander1.DataContext = model; modelBrand = new CategoryExtendWarrantyDisuseBrandQueryVM(); this.expander2.DataContext = modelBrand; }
private void dgCategoryExtendBrandQueryResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e) { CategoryExtendWarrantyQueryFacade facade = new CategoryExtendWarrantyQueryFacade(this); modelBrand = (CategoryExtendWarrantyDisuseBrandQueryVM)this.expander2.DataContext; facade.QueryCategoryExtendWarrantyDisuseBrand(modelBrand, e.PageSize, e.PageIndex, e.SortField, (obj, args) => { this.dgCategoryExtendBrandQueryResult.ItemsSource = args.Result.Rows; this.dgCategoryExtendBrandQueryResult.TotalCount = args.Result.TotalCount; }); }