public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); this.FilterVM = new OptionalAccessoriesQueryReqVM(); cbItemType.ItemsSource = new List <KeyValuePair <int, string> >() { new KeyValuePair <int, string>(-1, "--所有--"), new KeyValuePair <int, string>(1, "主商品"), new KeyValuePair <int, string>(0, "次商品") }; cbItemType.SelectedValue = -1; }
public void Query(OptionalAccessoriesQueryReqVM vm, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { OptionalAccessoriesQueryFilter filter = vm.ConvertVM <OptionalAccessoriesQueryReqVM, OptionalAccessoriesQueryFilter>(); filter.CompanyCode = CPApplication.Current.CompanyCode; filter.PagingInfo = new QueryFilter.Common.PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; string relativeUrl = "/MKTService/OptionalAccessories/Query"; restClient.QueryDynamicData(relativeUrl, filter, (obj, args) => { if (args.FaultsHandle()) { return; } callback(obj, args); }); }