コード例 #1
0
        public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Replace("{fieldId}", fieldId)
                          .Build();

            try {
                restClient.Delete(path);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not delete field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not delete field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
コード例 #2
0
        public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Replace("{fieldId}", field.Id)
                          .Build();

            try {
                string json = JsonConvert.SerializeObject(field, jsonSettings);
                restClient.Put(path, json);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not modify field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not modify field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
コード例 #3
0
        public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_PATH)
                          .Replace("{packageId}", packageId.Id)
                          .Replace("{documentId}", documentId)
                          .Replace("{approvalId}", signatureId.Id)
                          .Build();

            try {
                string json     = JsonConvert.SerializeObject(field, jsonSettings);
                string response = restClient.Post(path, json);
                Silanis.ESL.API.Field apiField = JsonConvert.DeserializeObject <Silanis.ESL.API.Field> (response, jsonSettings);
                return(apiField.Id);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not add field to signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not add field to signature.\t" + " Exception: " + e.Message, e);
            }
        }
コード例 #4
0
 public Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     Silanis.ESL.API.Field apiField = apiClient.GetField(packageId, documentId, signatureId, fieldId);
     return(new FieldConverter(apiField).ToSDKField());
 }
コード例 #5
0
 public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     apiClient.DeleteField(packageId, documentId, signatureId, fieldId);
 }
コード例 #6
0
 public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     return(apiClient.AddField(packageId, documentId, signatureId, apiField));
 }
コード例 #7
0
 public void ModifyConditionalField(PackageId packageId, string documentId, SignatureId signatureId, ConditionalField sdkField)
 {
     Silanis.ESL.API.ConditionalField apiField = new ConditionalFieldConverter(sdkField).ToAPIConditionalField();
     apiClient.ModifyConditionalField(packageId, documentId, signatureId, apiField);
 }
コード例 #8
0
 public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     apiClient.DeleteField(packageId, documentId, signatureId, fieldId);
 }
コード例 #9
0
 public string AddField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     return apiClient.AddField(packageId, documentId, signatureId, apiField);
 }
コード例 #10
0
 public Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
 {
     Silanis.ESL.API.Field apiField = apiClient.GetField(packageId, documentId, signatureId, fieldId);
     return new FieldConverter(apiField).ToSDKField();
 }
コード例 #11
0
 public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Field sdkField)
 {
     Silanis.ESL.API.Field apiField = new FieldConverter(sdkField).ToAPIField();
     apiClient.ModifyField(packageId, documentId, signatureId, apiField);
 }
コード例 #12
0
        public void DeleteField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", fieldId)
                    .Build();

            try {
                restClient.Delete(path);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not delete field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not delete field from signature.\t" + " Exception: " + e.Message, e);
            }
        }
コード例 #13
0
        public Silanis.ESL.API.Field GetField(PackageId packageId, string documentId, SignatureId signatureId, string fieldId)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", fieldId)
                    .Build();

            try {
                string response = restClient.Get(path);
                Silanis.ESL.API.Field apiField = JsonConvert.DeserializeObject<Silanis.ESL.API.Field> (response, jsonSettings);
                return apiField;
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not get field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not get field from signature.\t" + " Exception: " + e.Message, e);
            }

        }
コード例 #14
0
        public void ModifyField(PackageId packageId, string documentId, SignatureId signatureId, Silanis.ESL.API.Field field)
        {
            string path = template.UrlFor(UrlTemplate.FIELD_ID_PATH)
                .Replace("{packageId}", packageId.Id)
                    .Replace("{documentId}", documentId)
                    .Replace("{approvalId}", signatureId.Id)
                    .Replace("{fieldId}", field.Id)
                    .Build();

            try {
                string json = JsonConvert.SerializeObject (field, jsonSettings);
                restClient.Put(path, json);
            }
            catch (EslServerException e) {
                throw new EslServerException("Could not modify field from signature.\t" + " Exception: " + e.Message, e.ServerError, e);
            }
            catch (Exception e) {
                throw new EslException("Could not modify field from signature.\t" + " Exception: " + e.Message, e);
            }
        }