コード例 #1
0
        /// <summary>
        /// Get all Filters from DocumentFormDefinition
        /// </summary>
        /// <param name="definition">tp! DocumentFormDefinition</param>
        /// <param name="client">tp! Rest Client</param>
        /// <returns></returns>
        public static List <Filter> GetFilters(DocumentFormDefinition definition, RestClient client)
        {
            dynamic       data = client.ExecuteRequest(definition.Url + "/filters", RestSharp.Method.GET).ToDictionary(p => p.Key, p => p.Value);
            List <Filter> pros = new List <Filter>();

            foreach (var p in data["filters"])
            {
                pros.Add(new Filter()
                {
                    Title = p["title"], Url = p["href"]
                });
            }
            return(pros);
        }
コード例 #2
0
        /// <summary>
        /// Get all DocumentFieldDefinitions from DocumentFormDefinition
        /// </summary>
        /// <param name="documentFormDefinition">tp! DocumentFormDefinition</param>
        /// <param name="client">tp! Rest Client</param>
        /// <returns></returns>
        public static List <DocumentFieldDefinition> GetDocumentFieldDefinitions(DocumentFormDefinition documentFormDefinition, RestClient client)
        {
            dynamic data = client.ExecuteRequest(documentFormDefinition.Url + "/document_field_definitions", RestSharp.Method.GET).ToDictionary(p => p.Key, p => p.Value);
            List <DocumentFieldDefinition> documentFieldDefinitions = new List <DocumentFieldDefinition>();

            foreach (var p in data["document_field_definitions"])
            {
                documentFieldDefinitions.Add(new DocumentFieldDefinition()
                {
                    Title = p["title"], Url = p["href"]
                });
            }
            return(documentFieldDefinitions);
        }
コード例 #3
0
ファイル: Draft.cs プロジェクト: thinkprojectgroup/tpsharp
 /// <summary>
 ///
 /// </summary>
 /// <param name="documentFormDefinition">tp! DocumentFormDefinition</param>
 /// <param name="client">tp! Rest Client</param>
 /// <param name="values"></param>
 public void AddDraftDocument(DocumentFormDefinition documentFormDefinition, RestClient client, Dictionary <string, object> values = null)
 {
 }