Skip to content

Commit 3afcf66

Browse files
committed
Various updates to C# UI for some code examples, also updates version of the Maestro SDK
1 parent 0370f9f commit 3afcf66

File tree

19 files changed

+62
-38
lines changed

19 files changed

+62
-38
lines changed

launcher-csharp/Admin/Controllers/CreateCLMESignUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected override void InitializeInternal()
106106

107107
//ds-snippet-start:Admin2Step3
108108
var productPermissionProfileApi = new ProductPermissionProfilesApi(apiClient);
109-
var productPermissionProfiles = productPermissionProfileApi.GetProductPermissionProfiles(organizationId, Guid.Parse(accountId));
109+
var productPermissionProfiles = productPermissionProfileApi.GetProductPermissionProfiles(organizationId.Value, Guid.Parse(accountId));
110110
this.ViewBag.CLMPermissionProfiles = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "CLM").PermissionProfiles;
111111
this.ViewBag.ESignPermissionProfiles = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "ESign").PermissionProfiles;
112112
clmProductId = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "CLM").ProductId;

launcher-csharp/Admin/Controllers/DeleteUserDataFromAccount.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace DocuSign.CodeExamples.Admin.Controllers
1717
using Newtonsoft.Json;
1818

1919
[Area("Admin")]
20-
[Route("Aeg011")]
20+
[Route("aeg011")]
2121
public class DeleteUserDataFromAccount : EgController
2222
{
2323
public DeleteUserDataFromAccount(DsConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
@@ -27,7 +27,7 @@ public DeleteUserDataFromAccount(DsConfiguration config, LauncherTexts launcherT
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

30-
public override string EgName => "Aeg011";
30+
public override string EgName => "aeg011";
3131

3232
[MustAuthenticate]
3333
[SetViewBag]

launcher-csharp/Admin/Controllers/DeleteUserDataFromOrganization.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace DocuSign.CodeExamples.Admin.Controllers
1717
using Newtonsoft.Json;
1818

1919
[Area("Admin")]
20-
[Route("Aeg010")]
20+
[Route("aeg010")]
2121
public class DeleteUserDataFromOrganization : EgController
2222
{
2323
public DeleteUserDataFromOrganization(DsConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
@@ -27,7 +27,7 @@ public DeleteUserDataFromOrganization(DsConfiguration config, LauncherTexts laun
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

30-
public override string EgName => "Aeg010";
30+
public override string EgName => "aeg010";
3131

3232
[MustAuthenticate]
3333
[SetViewBag]

launcher-csharp/Maestro/Controllers/TriggerWorkflow.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public ActionResult SubmitForm(WorkflowTriggerModel model)
150150
docuSignManageClient,
151151
accountId,
152152
new Uri(workflow.TriggerUrl),
153-
model);
153+
model,
154+
this.RequestItemsService.WorkflowId);
154155

155156
this.RequestItemsService.InstanceId = result.InstanceId;
156157

launcher-csharp/Maestro/Examples/TriggerWorkflowService.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ public static string PublishWorkFlow(DocuSignClient docuSignClient, string accou
5050
}
5151
}
5252

53-
public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docuSignClient, string accountId, Uri triggerUrl, WorkflowTriggerModel model)
53+
public static TriggerWorkflowViaPostResponse TriggerWorkflow(
54+
DocuSignClient docuSignClient,
55+
string accountId,
56+
Uri triggerUrl,
57+
WorkflowTriggerModel model,
58+
string workflowId)
5459
{
5560
//ds-snippet-start:Maestro1Step4
5661
var maestroApi = new WorkflowTriggerApi(docuSignClient);
@@ -76,7 +81,7 @@ public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docu
7681
};
7782
//ds-snippet-end:Maestro1Step4
7883
//ds-snippet-start:Maestro1Step5
79-
return maestroApi.TriggerWorkflow(accountId, payload, options);
84+
return maestroApi.TriggerWorkflow(accountId, workflowId, payload, options);
8085
//ds-snippet-end:Maestro1Step5
8186
}
8287
}

launcher-csharp/Views/Home/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
Boolean.TryParse(ViewData["showDoc"].ToString(), out showDoc);//ViewBag.ShowDoc;
77
Layout = "_HomeLayout";
88
}
9-
<div class="jumbotron">
9+
<div class="jumbotron" style="background-color: #210058!important">
1010
<table>
1111
<tbody>
1212
<tr>
1313
<td>
14-
<h1 class="display-4">C# Launcher</h1>
14+
<h1 class="display-4" style="background-color: #210058!important">C# Launcher</h1>
1515
<p class="Xlead">
1616
@Html.Raw(ViewBag.SupportingTexts.HomePageText)
1717
</p>
1818
</td>
1919
<td>
20-
<img src="/images/banner-code.PNG" />
20+
<img src="/images/header.PNG" />
2121
</td>
2222
</tr>
2323
</tbody>

launcher-csharp/appsettings.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"AppUrl": "https://localhost:44333",
1616
"RoomsApiEndpoint": "https://demo.rooms.docusign.com",
1717
"AdminApiEndpoint": "https://api-d.docusign.net/management",
18-
"MaestroApiEndpoint": "https://demo.services.docusign.net/",
18+
"MaestroApiEndpoint": "https://apps-d.docusign.com/api/maestro",
1919
"WebFormsBasePath": "https://apps-d.docusign.com/api/webforms/v1.1",
2020
"CodeExamplesManifest": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/CodeExamplesManifest.json",
2121
"SignerEmail": "{SIGNER_EMAIL}",

launcher-csharp/eSignature/Controllers/RecipientAuthIDV.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthIdv(DsConfiguration config, LauncherTexts launcherTexts, IRe
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string ccEmail, string ccName)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

launcher-csharp/eSignature/Controllers/RecipientAuthKBA.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ public RecipientAuthKba(DsConfiguration config, LauncherTexts launcherTexts, IRe
2626
[SetViewBag]
2727
public IActionResult Create(string signerEmail, string signerName)
2828
{
29+
if (signerEmail == this.Config.SignerEmail)
30+
{
31+
this.ViewBag.errorCode = "400";
32+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
33+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
34+
35+
return this.View("Error");
36+
}
37+
2938
// Check the token with minimal buffer time.
3039
bool tokenOk = this.CheckToken(3);
3140
if (!tokenOk)

launcher-csharp/eSignature/Controllers/RecipientAuthPhone.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthPhone(DsConfiguration config, LauncherTexts launcherTexts, I
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string signerCountryCode, string signerPhoneNumber)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

0 commit comments

Comments
 (0)