How to add Name field in Docusing envelope? - vb.net

Currently i can create envelope with signers dynamically, now i want to add Name field above the signer, i using below code to set Auto search Text.
' Document
Dim doc1 As Document = New Document With {
.DocumentBase64 = doc1DocxBytes,
.Name = ext1(0),
.FileExtension = ext1(1),
.DocumentId = "1"
}
env.Documents = New List(Of Document) From {
doc1
}
'Signer1
Dim signer1 As Signer = New Signer With {
.Email = signerEmail,
.Name = signerName,
.RecipientId = "1",
.RoutingOrder = "1"
}
Dim signHere212 As SignHere = New SignHere With {
.AnchorString = "For and on behalf of the vendor",
.AnchorUnits = "pixels",
.AnchorYOffset = "70",
.AnchorXOffset = "20"
}
Dim fullName212 As FullName = New FullName With {
.AnchorString = "For and on behalf of the vendor",
.AnchorUnits = "pixels",
.AnchorYOffset = "100",
.AnchorXOffset = "20"
}
Dim signer1Tabs As Tabs = New Tabs With {
.SignHereTabs = New List(Of SignHere) From {
signHere212
},
.FullNameTabs = New List(Of FullName) From {
fullName212
}
}
signer1.Tabs = signer1Tabs
Dim recipients As Recipients = New Recipients With {
.Signers = New List(Of Signer) From {
signer1
}
}
env.Recipients = recipients
env.Status = "sent"
Dim envelopeEvents = New List(Of EnvelopeEvent)()
envelopeEvents.Add(New EnvelopeEvent With {
.EnvelopeEventStatusCode = "completed",
.IncludeDocuments = "true"
})
eventNotification.EnvelopeEvents = envelope
From above code i placed sign on the top of "For and on behalf of the vendor", now i want Name field to add Name when signer sign the document.Please provide piece of code.

Dim fullName212 As FullName = New FullName With {
.AnchorString = "For and on behalf of the vendor",
.AnchorUnits = "pixels",
.AnchorYOffset = "70",
.AnchorXOffset = "20"
}
Dim signer1Tabs As Tabs = New Tabs With {
.SignHereTabs = New List(Of SignHere) From {
signHere1
},
.FullNameTabs = New List(Of FullName) From {
fullName212
}
signer1.Tabs = signer1Tabs
Dim recipients As Recipients = New Recipients With {
.Signers = New List(Of Signer) From {
signer1
}
}

Related

Google Calendar Add multiple events at same time

I'm trying to add/update multiples event at same time in Google Calendar, in the example below I've to execute 1 by 1, but I want to use only one .Execute...
Sometimes I've to update 30-50 events at same time and every .Execute takes aprox. 1 second each.
I also tried to make a UpdateRequest list but I couldn't execute them at same time, I had to execute 1 by 1.
Private Sub AddEvents()
Dim newEvent1 As New [Event]() With {
.Summary = "Event1",
.Description = "Desc1",
.Start = New EventDateTime() With {.DateTime = DataHora, .TimeZone = TimeZone},
.End = New EventDateTime() With {.DateTime = DateAdd(DateInterval.Hour, 1, DataHora), .TimeZone = TimeZone},
.Reminders = New [Event].RemindersData() With {.UseDefault = True},
.ColorId = CorEvento
}
Dim newEvent2 As New [Event]() With {
.Summary = "Event2",
.Description = "Desc2",
.Start = New EventDateTime() With {.DateTime = DataHora, .TimeZone = TimeZone},
.End = New EventDateTime() With {.DateTime = DateAdd(DateInterval.Hour, 1, DataHora), .TimeZone = TimeZone},
.Reminders = New [Event].RemindersData() With {.UseDefault = True},
.ColorId = CorEvento
}
Dim request1 As EventsResource.UpdateRequest = service.Events.Update(newEvent1, RetornaCalendario(), EventID1)
request1.Execute()
Dim request2 As EventsResource.UpdateRequest = service.Events.Update(newEvent2, RetornaCalendario(), EventID2)
request2.Execute()
End Sub

How to pass phone verification in DocuSign?

Here i use DocuSign SDK code for send envelope, so in this how to pass phone verification ?
In this code I pass signer and signing location with the help of co-ordinates and send to envelope. I get access token without fail.
Private Function DoWork(ByVal signerEmail As String, ByVal signerName As String, ByVal ccEmail As String, ByVal ccName As String, ByVal accessToken As String, ByVal basePath As String, ByVal accountId As String, ByVal templateId As String) As String
Dim config = New Configuration(New ApiClient(basePath))
config.AddDefaultHeader("Authorization", "Bearer " & accessToken)
Dim envelopesApi As EnvelopesApi = New EnvelopesApi(config)
Dim envelope As EnvelopeDefinition = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, templateId)
Dim result As EnvelopeSummary = envelopesApi.CreateEnvelope(accountId, envelope)
Return result.EnvelopeId
End Function
Private Function MakeEnvelope(ByVal signerEmail As String, ByVal signerName As String) As EnvelopeDefinition
Dim buffer As Byte() = System.IO.File.ReadAllBytes(Config.docPdf)
Dim envelopeDefinition As EnvelopeDefinition = New EnvelopeDefinition()
envelopeDefinition.EmailSubject = "Please sign this document"
Dim doc1 As Document = New Document()
Dim doc1b64 As String = Convert.ToBase64String(buffer)
doc1.DocumentBase64 = doc1b64
doc1.Name = "Lorem Ipsum"
doc1.FileExtension = "pdf"
doc1.DocumentId = "3"
envelopeDefinition.Documents = New List(Of Document) From {
doc1
}
Dim signer1 As Signer = New Signer With {
.Email = signerEmail,
.Name = signerName,
.ClientUserId = signerClientId,
.RecipientId = "1"
}
Dim signHere1 As SignHere = New SignHere With {
.AnchorString = "/sn1/",
.AnchorUnits = "pixels",
.AnchorXOffset = "10",
.AnchorYOffset = "20"
}
Dim signer1Tabs As Tabs = New Tabs With {
.SignHereTabs = New List(Of SignHere) From {
signHere1
}
}
signer1.Tabs = signer1Tabs
Dim recipients As Recipients = New Recipients With {
.Signers = New List(Of Signer) From {
signer1
}
}
envelopeDefinition.Recipients = recipients
envelopeDefinition.Status = "sent"
Return envelopeDefinition
End Function
I want to pass phone number to verify once open document from email. Anybody help in this feature will appreciated.
Thanks and Regards
Aravind
https://developers.docusign.com/docs/esign-rest-api/how-to/phone-auth/
Dim workflow As RecipientIdentityVerification = New RecipientIdentityVerification() With {
.WorkflowId = workflowId,
.InputOptions = New List(Of RecipientIdentityInputOption) From {
New RecipientIdentityInputOption With {
.Name = "phone_number_list",
.ValueType = "PhoneNumberList",
.PhoneNumberList = New List(Of RecipientIdentityPhoneNumber) From {
New RecipientIdentityPhoneNumber With {
.Number = phoneNumber,
.CountryCode = countryAreaCode
}
}
}
}
Since we don't have VB.NET examples, I used this site to convert C# code.
}

How to pass DocuSign email EmailBlurb for each signer?

I have create envelope and pass signer,document, position to sign.So in that i need to pass EmailBlurb for each signer separately.Form Docusing web ui can set using following option and each signer get different message.
So how to pass this message from Docusing code, here the piece of code which i pass 2 signers
Private Function MakeEnvelope(ByVal signerEmail As String, ByVal signerName As String) As EnvelopeDefinition
Dim buffer As Byte() = System.IO.File.ReadAllBytes(Config.docPdf)
Dim envelopeDefinition As EnvelopeDefinition = New EnvelopeDefinition()
envelopeDefinition.EmailSubject = "Please sign this document"
envelopeDefinition.EmailBlurb ="Dear. A Thanks and regards" ' this will appear for both signer
Dim doc1 As Document = New Document()
Dim doc1b64 As String = Convert.ToBase64String(buffer)
doc1.DocumentBase64 = doc1b64
doc1.Name = "Lorem Ipsum"
doc1.FileExtension = "pdf"
doc1.DocumentId = "1"
envelopeDefinition.Documents = New List(Of Document) From {
doc1
}
Dim signer1 As Signer = New Signer With {
.Email = signerEmail,
.Name = signerName,
.ClientUserId = signerClientId,
.RecipientId = "1"
}
Dim signer2 As Signer = New Signer With {
.Email = signerEmail2,
.Name = signerName2,
.ClientUserId = signerClientId2,
.RecipientId = "2"
}
This will appear for both signer as same message, i need to make each signer name need to show there.
envelopeDefinition.EmailBlurb ="Dear. A Thanks and regards"
This article shows how to do that in six langs, including C#. I have converted the C# to VB.NET for you and here it is:
Dim signer1 As Signer = New Signer With {
.Email = "inbar#example.com",
.Name = "Inbar Gazit",
.RecipientId = "1",
.RoutingOrder = "1",
.EmailNotification = New RecipientEmailNotification With {
.EmailSubject = "Custom email subject for signer 1",
.EmailBody = "Custom email body for signer 1"
}
}Z

Docusing i want to send additional file in same envelope id using vb.net

i am using following code to send file with create envelope and signer and where to sign.
Imports System
Imports System.Collections.Generic
Imports DocuSign.eSign.Api
Imports DocuSign.eSign.Client
Imports DocuSign.eSign.Model
Imports Microsoft.AspNetCore.Mvc
Private Function DoWork(ByVal signerEmail As String, ByVal signerName As String, ByVal ccEmail As String, ByVal ccName As String, ByVal accessToken As String, ByVal basePath As String, ByVal accountId As String, ByVal templateId As String) As String
Dim config = New Configuration(New ApiClient(basePath))
config.AddDefaultHeader("Authorization", "Bearer " & accessToken)
Dim envelopesApi As EnvelopesApi = New EnvelopesApi(config)
Dim envelope As EnvelopeDefinition = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, templateId)
Dim result As EnvelopeSummary = envelopesApi.CreateEnvelope(accountId, envelope)
Return result.EnvelopeId
End Function
Private Function MakeEnvelope(ByVal signerEmail As String, ByVal signerName As String) As EnvelopeDefinition
Dim buffer As Byte() = System.IO.File.ReadAllBytes(Config.docPdf)
Dim envelopeDefinition As EnvelopeDefinition = New EnvelopeDefinition()
envelopeDefinition.EmailSubject = "Please sign this document"
Dim doc1 As Document = New Document()
Dim doc1b64 As String = Convert.ToBase64String(buffer)
doc1.DocumentBase64 = doc1b64
doc1.Name = "Lorem Ipsum"
doc1.FileExtension = "pdf"
doc1.DocumentId = "3"
envelopeDefinition.Documents = New List(Of Document) From {
doc1
}
Dim signer1 As Signer = New Signer With {
.Email = signerEmail,
.Name = signerName,
.ClientUserId = signerClientId,
.RecipientId = "1"
}
Dim signHere1 As SignHere = New SignHere With {
.AnchorString = "/sn1/",
.AnchorUnits = "pixels",
.AnchorXOffset = "10",
.AnchorYOffset = "20"
}
Dim signer1Tabs As Tabs = New Tabs With {
.SignHereTabs = New List(Of SignHere) From {
signHere1
}
}
signer1.Tabs = signer1Tabs
Dim recipients As Recipients = New Recipients With {
.Signers = New List(Of Signer) From {
signer1
}
}
envelopeDefinition.Recipients = recipients
envelopeDefinition.Status = "sent"
Return envelopeDefinition
End Function
i take working solution from this link In Docusign using with Chilkat dll , how to pass templateRoles in json? by Inbar Gazit. i can send and get envelope id as return summary.
Now i want to add additional file which first file is signed by all signer. Same like again need to add 3rd file which 2nd file is signed by all signer in same envelope id. We use docusign connect to trigger event when signed by all signer.So we know document is singed by all signer or not.
In what way we can add additional document in same envelope id and send it again using Docusing dll. i have working c# project which download from docusign quickstart in that got 31 examples.
Note i am not use docusing rest or soap api.
Eg: We have machinery product company, First we send agreement related to product and prices to the signer, once get back agreement file signed by all, then we deploy and setup machinery in customer place once done ,then we send second acknowledge document to singer, once signed by all , filly we send finishing contract document. So we send all 3 files in same envelopeid in one by one.
Regards and Thanks
Aravind
I think you just want one more document, then it's simple, add/change this code:
Dim doc1 As Document = New Document()
Dim doc1b64 As String = Convert.ToBase64String(buffer)
doc1.DocumentBase64 = doc1b64
doc1.Name = "Lorem Ipsum"
doc1.FileExtension = "pdf"
doc1.DocumentId = "3"
Dim doc2 As Document = New Document()
Dim doc2b64 As String = Convert.ToBase64String(buffer2)
doc2.DocumentBase64 = doc2b64
doc2.Name = "Second doc"
doc2.FileExtension = "pdf"
doc2.DocumentId = "4"
envelopeDefinition.Documents = New List(Of Document) From {
doc1, docs2
}

Linq to SQL in VS 2019 using VB.NET - Outer left join?

I'm struggling to get the result I need from my linq to SQL query. I can find all of the person table records, or only the ones that have a corresponding date_table entry. This is the query I'm using, this results in only MK numbers 101 and 104 being returned. Numbers 100 and 105 are missed I guess because they don't have a valid record for today?
Where Person_data_table.MK = Date_Table.FK And Date_Table.Allocated <> "Vacation" And Date_Table.Allocated <> "Sick" And Date_Table.Date = Today And Person_data_table.Team = "A"
This is the table data (note Today is 15-Mar-20) - Please keep answers in VB, as C# answers don't tend to work after I have translated them! - Any help appreciated
regards
Peter
Notice that you also posted your question here.
Is your question still unresolved? You can try my code as follows. Sorry I didn't use SQL, I used class, but that didn't affect the result.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim MK100 As NewPerson = New NewPerson With {
.MK = "100",
.First_Name = "Mike",
.Last_Name = "Smith",
.Team = "A"
}
Dim MK101 As NewPerson = New NewPerson With {
.MK = "101",
.First_Name = "Dave",
.Last_Name = "Sharp",
.Team = "A"
}
Dim MK102 As NewPerson = New NewPerson With {
.MK = "102",
.First_Name = "Roger",
.Last_Name = "Hands",
.Team = "A"
}
Dim MK103 As NewPerson = New NewPerson With {
.MK = "103",
.First_Name = "Keely",
.Last_Name = "Riller",
.Team = "A"
}
Dim MK104 As NewPerson = New NewPerson With {
.MK = "104",
.First_Name = "Simon",
.Last_Name = "Says",
.Team = "A"
}
Dim MK105 As NewPerson = New NewPerson With {
.MK = "105",
.First_Name = "Eugene",
.Last_Name = "Phillips",
.Team = "A"
}
Dim MK106 As NewPerson = New NewPerson With {
.MK = "106",
.First_Name = "William",
.Last_Name = "Nobody",
.Team = "B"
}
Dim FK101 As NewDate = New NewDate With {
.FK = "101",
.Date_ = "15-Mar-20",
.Allocated = "Job Number 1"
}
Dim FK102 As NewDate = New NewDate With {
.FK = "102",
.Date_ = "15-Mar-20",
.Allocated = "Vacation"
}
Dim FK103 As NewDate = New NewDate With {
.FK = "103",
.Date_ = "15-Mar-20",
.Allocated = "Sick"
}
Dim FK104 As NewDate = New NewDate With {
.FK = "104",
.Date_ = "15-Mar-20",
.Allocated = "Job nunber 2"
}
Dim Person_Data_table As List(Of NewPerson) = New List(Of NewPerson) From {
MK100,
MK101,
MK102,
MK103,
MK104,
MK105,
MK106
}
Dim Date_Table As List(Of NewDate) = New List(Of NewDate) From {
FK101,
FK102,
FK103,
FK104
}
Dim query = From NewPerson In Person_Data_table Group Join NewDate In Date_Table On NewPerson.MK Equals NewDate.FK Into gj = Group From subperson In gj.DefaultIfEmpty() Where (NewPerson.Team = "A") AndAlso (subperson Is Nothing OrElse ((subperson.Allocated <> "Vacation") AndAlso (subperson.Allocated <> "Sick"))) Select New With {NewPerson.MK, NewPerson.First_Name, NewPerson.Last_Name, NewPerson.Team
}
For Each v In query
ListBox1.Items.Add($"{v.MK,-15}{v.First_Name,-15}{v.Last_Name,-15}{v.Team}")
Next
End Sub
End Class
Class NewPerson
Public Property MK As String
Public Property First_Name As String
Public Property Last_Name As String
Public Property Team As String
End Class
Class NewDate
Public Property FK As String
Public Property Date_ As String
Public Property Allocated As String
End Class
And the effect is as follows: