Skip to content

Commit b764ebd

Browse files
authored
Merge pull request #165 from docusign/feature/web-forms-code-example
Updating codeDepot markers
2 parents a6b7e10 + 8f38f0e commit b764ebd

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

launcher-csharp/WebForms/Controllers/CreateAndEmbedForm.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ public ActionResult CheckTemplates()
4848
string accessToken = this.RequestItemsService.User.AccessToken;
4949
string accountId = this.RequestItemsService.Session.AccountId;
5050

51+
//ds-snippet-start:WebForms1Step2
5152
var docuSignClient = new DocuSignClient(basePath);
5253
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
54+
//ds-snippet-end:WebForms1Step2
5355

5456
List<EnvelopeTemplate> templates = CreateAndEmbedFormService.GetTemplatesByName(
5557
docuSignClient,

launcher-csharp/WebForms/Examples/CreateAndEmbedFormService.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static WebFormInstance CreateInstance(
4545
string accountId,
4646
string formId)
4747
{
48-
FormInstanceManagementApi formManagementApi = new FormInstanceManagementApi(docuSignClient);
48+
//ds-snippet-start:WebForms1Step4
4949
var formValues = new WebFormValues
5050
{
5151
{ "PhoneNumber", "555-555-5555" },
@@ -60,20 +60,26 @@ public static WebFormInstance CreateInstance(
6060
FormValues = formValues,
6161
ExpirationOffset = 3600,
6262
};
63+
//ds-snippet-end:WebForms1Step4
6364

65+
//ds-snippet-start:WebForms1Step5
66+
FormInstanceManagementApi formManagementApi = new FormInstanceManagementApi(docuSignClient);
6467
return formManagementApi.CreateInstance(accountId, formId, options);
68+
//ds-snippet-end:WebForms1Step5
6569
}
6670

6771
public static List<EnvelopeTemplate> GetTemplatesByName(
6872
DocuSignClient docuSignClient,
6973
string accountId,
7074
string templateName)
7175
{
76+
//ds-snippet-start:WebForms1Step3
7277
var templatesApi = new TemplatesApi(docuSignClient);
7378
var listTemplateOptions = new TemplatesApi.ListTemplatesOptions();
7479
listTemplateOptions.searchText = templateName;
7580

7681
EnvelopeTemplateResults templates = templatesApi.ListTemplates(accountId, listTemplateOptions);
82+
//ds-snippet-end:WebForms1Step3
7783

7884
return templates.EnvelopeTemplates;
7985
}

launcher-csharp/WebForms/Views/CreateAndEmbedForm/Embed.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
//ds-snippet-start:eSign44Step6
2+
//ds-snippet-start:WebForms1Step6
33
}
44
<!DOCTYPE html>
55
<html>
@@ -68,5 +68,5 @@ async function loadWebform() {
6868
loadWebform();
6969
</script>
7070
@{
71-
//ds-snippet-end:eSign44Step6
71+
//ds-snippet-end:WebForms1Step6
7272
}

0 commit comments

Comments
 (0)