public void ExportShiftConfigInfo(StockShiftConfigQueryVM vm, ColumnSet[] columns) { StockShiftConfigFilter queryFilter; vm.CompanyCode = CPApplication.Current.CompanyCode; queryFilter = vm.ConvertVM <StockShiftConfigQueryVM, StockShiftConfigFilter>(); string relativeUrl = "/InventoryService/StockShiftConfig/Query"; restClient.ExportFile(relativeUrl, queryFilter, columns); }
private void dgStockShiftConfig_ExportAllClick(object sender, EventArgs e) { if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ShiftConfigInfoQuery_ExportExcell)) { Window.Alert("对不起,你没有权限进行此操作!"); return; } if (this.dgStockShiftConfig == null || this.dgStockShiftConfig.TotalCount == 0) { Window.Alert("没有可供导出的数据!"); return; } StockShiftConfigQueryVM exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <StockShiftConfigQueryVM>(PageView.QueryInfo); exportQueryRequest.PagingInfo = new QueryFilter.Common.PagingInfo() { PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit }; ColumnSet col = new ColumnSet(dgStockShiftConfig); StockShiftConfigFacade.ExportShiftConfigInfo(exportQueryRequest, new ColumnSet[] { col }); }
public void Query(StockShiftConfigQueryVM vm, Action <int, List <dynamic> > callback) { vm.CompanyCode = CPApplication.Current.CompanyCode; StockShiftConfigFilter filter; filter = vm.ConvertVM <StockShiftConfigQueryVM, StockShiftConfigFilter>(); string relativeUrl = "/InventoryService/StockShiftConfig/Query"; restClient.QueryDynamicData(relativeUrl, filter, (obj, args) => { if (!args.FaultsHandle()) { int totalCount = 0; List <dynamic> vmList = null; if (!(args.Result == null || args.Result.Rows == null)) { totalCount = args.Result.TotalCount; vmList = args.Result.Rows.ToList(); } callback(totalCount, vmList); } }); }