PostingsServiceClient wsClient = new PostingsServiceClient();
string sTitle = txtTitle.Text + " - " + DateTime.Now.ToString(); string sDesc = txtDesc.Text; List<PostingAdmin> aPostingAdmins = new List<PostingAdmin>(); List<Recipient> aRecipients = new List<Recipient>(); List<Attachment> aAttachments = new List<Attachment>();
aPostingAdmins.Add(new PostingAdmin { Email = "example@company.com", MobileNumber = "11000000", Name = "Ola Nordmann", NotifyByEmail = true, SSN = "0000000000" });
aRecipients.Add(new Recipient { Email = "example@company.com", MobileNumber = "12000000", Name = "Nora Nordmann", Priority = 0, NotifyByEmail = true });
aAttachments.Add(new Attachment { ActionType = ActionType.Sign, Description = "Description of the file", File = OpenFile(txtFilePath.Text), FileName = "filename.pdf" });
Posting post = new Posting(); post.Title = sTitle; post.Description = sDesc; post.ActiveTo = DateTime.Now.AddDays(30); post.WillBeDeletedDateTime = DateTime.Now.AddDays(31); post.UseWidget = true; post.AutoActivate = true; post.Attachments = aAttachments.ToArray(); post.Recipients = aRecipients.ToArray(); post.PostingAdmins = aPostingAdmins.ToArray();
var wsResult = wsClient.CreateSignPosting("Contact Signant for DistributorID", "Contact Signant for AccessCode", post);
|