public void QueryPropertyValueListByPropertySysNo(PropertyValueQueryVM model, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { PropertyValueQueryFilter filter; filter = model.ConvertVM <PropertyValueQueryVM, PropertyValueQueryFilter>(); filter.SysNo = model.SysNo; filter.PropertySysNo = model.PropertySysNo; filter.PagingInfo = new PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; string relativeUrl = "/IMService/Property/QueryPropertyValueListByPropertySysNo"; restClient.QueryDynamicData(relativeUrl, filter, (obj, args) => { if (args.FaultsHandle()) { return; } callback(obj, args); } ); }
private void dgPropertyValueQueryResult_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e) { if (_editingPropertySysNo > 0) { PropertyValueQueryVM model = new PropertyValueQueryVM(); model.PropertySysNo = _editingPropertySysNo; PropertyValueQueryFacade facade = new PropertyValueQueryFacade(); facade.QueryPropertyValueListByPropertySysNo(model, e.PageSize, e.PageIndex, e.SortField, (obj, args) => { _vmList = DynamicConverter <PropertyValueVM> .ConvertToVMList <List <PropertyValueVM> >(args.Result.Rows); this.dgPropertyValueQueryResult.ItemsSource = _vmList; this.dgPropertyValueQueryResult.TotalCount = args.Result.TotalCount; if (CheckPVStatus != null) { CheckPVStatus(); } //首次加载页面 if (!_isEditing) { this.DataContext = new PropertyValueVM(); tbPropertyValueName.Text = ""; tbPropertyPriority.Text = ""; cbPropertyValueStatus.SelectedIndex = 0; } }); } }