public InputTable getTableByName(string name) { try { var request1 = new RestRequest(ResourcePath + "/tablename/" + name, Method.GET); RestResponse queryResult = (RestResponse)RestClient.Execute(request1); System.Web.Script.Serialization.JavaScriptSerializer Serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); Serializer.MaxJsonLength = int.MaxValue; InputTableBrowserData value = Serializer.Deserialize <InputTableBrowserData>(queryResult.Content); if (value == null) { return(null); } return(new InputTable() { creationDate = value.creationDate, modificationDate = value.modificationDate, name = value.name, oid = value.oid, visibleInShortcut = value.visibleInShortcut, group = new BGroup(value.group) }); } catch (Exception) { return(null); } }
/// <summary> /// Rajoute une inputTable /// </summary> /// <param name="inputTable">L'inputTable à modifier</param> public void AddInputTable(InputTable inputTable) { InputTableBrowserData data = new InputTableBrowserData(); if (inputTable.oid.HasValue) { data.oid = inputTable.oid.Value; } data.name = inputTable.name; if (inputTable.group != null) { data.group = inputTable.group.name; } this.liste.Add(data); this.cvs.DeferRefresh(); }