public ProductERPCategorySearch() { InitializeComponent(); if (null == _viewModel) { _viewModel = new ProductERPCategoryQueryVM(); } this.Loaded += new RoutedEventHandler(ProductERPCategorySearch_Loaded); }
/// <summary> /// 查询ERP大类码 /// </summary> /// <param name="model"></param> /// <param name="PageSize"></param> /// <param name="PageIndex"></param> /// <param name="SortField"></param> /// <param name="callback"></param> public void QueryProductERPCategoryList(ProductERPCategoryQueryVM model, PagingInfo p, EventHandler <RestClientEventArgs <dynamic> > callback) { ProductERPCategoryQueryFilter filter = model.ConvertVM <ProductERPCategoryQueryVM, ProductERPCategoryQueryFilter>(); filter.PagingInfo = p; restClient.QueryDynamicData(GetRelativeUrl, 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); } ); }