/// <summary> /// Retrieves a list of row objects /// </summary> /// <param name="page"> /// The requested page from the server. This is an optional /// argument and if omitted the server will default to returning the /// first page with a maximum of <c>100</c> items. /// </param> /// <param name="filter"> /// A filter object to filter the row on the server. If omitted, the /// server will return all objects as a paginated response. /// </param> /// <param name="sort"> /// A sort definition object to sort the row on supported properties. /// If omitted objects are returned in the order as they were created /// in. /// </param> /// <returns>A paginated list of rows in a datacenter</returns> public RowList GetRows( PageInput page = null, RowFilter filter = null, RowSort sort = null ) { // prepare parameters GraphQLParameters parameters = new GraphQLParameters(); parameters.Add("page", page, true); parameters.Add("filter", filter, true); parameters.Add("sort", sort, true); return(RunQuery <RowList>(@"getRows", parameters)); }
/// <summary> /// 按排序条件重新整理数据 /// </summary> /// <param name="p_data"></param> void ReBuildData(Table p_data) { string[] rowOrder = RowSort.ToLower().Split(','); string[] colOrder = ColSort.ToLower().Split(','); IOrderedEnumerable <Row> orderData = null; if (rowOrder.Length > 0) { orderData = Order(orderData, p_data.Clone(), rowOrder); } if (colOrder.Length > 0) { orderData = Order(orderData, p_data.Clone(), colOrder); } if (orderData != null) { p_data.Clear(); foreach (Row dr in orderData) { p_data.Add(dr); } } }