@@ -37,6 +37,15 @@ public IActionResult Create(string signerEmail, string signerName, string ccEmai
3737 RequestItemsService . EgName = EgName ;
3838 return Redirect ( "/ds/mustAuthenticate" ) ;
3939 }
40+ EnvelopeSummary results = DoWork ( signerEmail , signerName , ccEmail , ccName ) ;
41+ ViewBag . h1 = "Envelope sent" ;
42+ ViewBag . message = "The envelope has been created and sent!<br />Envelope ID " + results . EnvelopeId + "." ;
43+ //return results;
44+ return View ( "example_done" ) ;
45+ }
46+
47+ public EnvelopeSummary DoWork ( string signerEmail , string signerName , string ccEmail , string ccName )
48+ {
4049 var session = RequestItemsService . Session ;
4150 var user = RequestItemsService . User ;
4251 EnvelopeDefinition env = MakeEnvelope ( signerEmail , signerName , ccEmail , ccName ) ;
@@ -45,10 +54,7 @@ public IActionResult Create(string signerEmail, string signerName, string ccEmai
4554 EnvelopesApi envelopesApi = new EnvelopesApi ( config ) ;
4655 EnvelopeSummary results = envelopesApi . CreateEnvelope ( RequestItemsService . Session . AccountId , env ) ;
4756 RequestItemsService . EnvelopeId = results . EnvelopeId ;
48- ViewBag . h1 = "Envelope sent" ;
49- ViewBag . message = "The envelope has been created and sent!<br />Envelope ID " + results . EnvelopeId + "." ;
50- //return results;
51- return View ( "example_done" ) ;
57+ return results ;
5258 }
5359
5460 private EnvelopeDefinition MakeEnvelope ( string signerEmail , string signerName , string ccEmail , string ccName )
0 commit comments