protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            // Construct the recipients
            List<DocuSignAPI.Recipient> runningList = new List<DocuSignAPI.Recipient>();
            DocuSignAPI.Recipient r1 = new DocuSignAPI.Recipient();
            r1.UserName = Session["APIEmail"].ToString();
            r1.Email = Session["APIEmail"].ToString();
            r1.ID = "1";
            r1.Type = DocuSignAPI.RecipientTypeCode.Signer;
            r1.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
            r1.CaptiveInfo.ClientUserId = "1";
            runningList.Add(r1);

            // If we're creating an envelop with two signers,
            // add the second signer with dummy credentials
            if (!_oneSigner)
            {
                DocuSignAPI.Recipient r2 = new DocuSignAPI.Recipient();
                r2.UserName = "******";
                r2.Email = "*****@*****.**";
                r2.ID = "2";
                r2.Type = DocuSignAPI.RecipientTypeCode.Signer;
                r2.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                r2.CaptiveInfo.ClientUserId = "2";
                runningList.Add(r2);
            }

            return runningList.ToArray();
        }
        protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            List<DocuSignAPI.Recipient> runningList = new List<DocuSignAPI.Recipient>();

            // Create all the recipients on the template's envelope
            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (Request.Form["RecipientRole" + i] != null)
                {
                    DocuSignAPI.Recipient r = new DocuSignAPI.Recipient();
                    r.UserName = Request.Form["RecipientName" + i].ToString();
                    r.Email = Request.Form["RecipientEmail" + i].ToString();
                    r.ID = i.ToString();
                    r.RoleName = Request.Form["RecipientRole" + i];
                    r.Type = DocuSignAPI.RecipientTypeCode.Signer;

                    if (Request.Form["RecipientInviteToggle" + i] == null)
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                        r.CaptiveInfo.ClientUserId = i.ToString();
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }

            return runningList.ToArray();
        }
        protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            List <DocuSignAPI.Recipient> runningList = new List <DocuSignAPI.Recipient>();

            // Create all the recipients on the template's envelope
            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (Request.Form["RecipientRole" + i] != null)
                {
                    DocuSignAPI.Recipient r = new DocuSignAPI.Recipient();
                    r.UserName = Request.Form["RecipientName" + i].ToString();
                    r.Email    = Request.Form["RecipientEmail" + i].ToString();
                    r.ID       = i.ToString();
                    r.RoleName = Request.Form["RecipientRole" + i];
                    r.Type     = DocuSignAPI.RecipientTypeCode.Signer;

                    if (Request.Form["RecipientInviteToggle" + i] == null)
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                        r.CaptiveInfo.ClientUserId = i.ToString();
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }

            return(runningList.ToArray());
        }
        protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            var runningList = new List <DocuSignAPI.Recipient>();

            // Create all the recipients on the template's envelope
            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (null != Request.Form[Keys.RecipientRole + i])
                {
                    var r = new DocuSignAPI.Recipient
                    {
                        UserName = Request.Form[Keys.RecipientName + i].ToString(),
                        Email    = Request.Form[Keys.RecipientEmail + i].ToString(),
                        ID       = i.ToString(),
                        RoleName = Request.Form[Keys.RecipientRole + i],
                        Type     = DocuSignAPI.RecipientTypeCode.Signer
                    };

                    if (null == Request.Form[Keys.RecipientInviteToggle + i])
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo {
                            ClientUserId = i.ToString()
                        };
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }

            return(runningList.ToArray());
        }
Beispiel #5
0
        protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            // Construct the recipients
            List <DocuSignAPI.Recipient> runningList = new List <DocuSignAPI.Recipient>();

            DocuSignAPI.Recipient r1 = new DocuSignAPI.Recipient();
            r1.UserName    = Session["APIUserName"].ToString();
            r1.Email       = Session["APIEmail"].ToString();
            r1.ID          = "1";
            r1.Type        = DocuSignAPI.RecipientTypeCode.Signer;
            r1.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
            r1.CaptiveInfo.ClientUserId = "1";
            runningList.Add(r1);

            // If we're creating an envelop with two signers,
            // add the second signer with dummy credentials
            if (!_oneSigner)
            {
                DocuSignAPI.Recipient r2 = new DocuSignAPI.Recipient();
                r2.UserName    = "******";
                r2.Email       = "*****@*****.**";
                r2.ID          = "2";
                r2.Type        = DocuSignAPI.RecipientTypeCode.Signer;
                r2.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                r2.CaptiveInfo.ClientUserId = "2";
                runningList.Add(r2);
            }

            return(runningList.ToArray());
        }
        private DocuSignAPI.Recipient[] ConstructRecipients()
        {
            // Construct the recipients
            List <DocuSignAPI.Recipient> runningList = new List <DocuSignAPI.Recipient>();

            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (Request.Form["RecipientName" + i] != null)
                {
                    DocuSignAPI.Recipient r = new DocuSignAPI.Recipient();
                    r.UserName = Request.Form["RecipientName" + i].ToString();
                    r.Email    = Request.Form["RecipientEmail" + i].ToString();

                    // Get and set the security settings
                    string security = Request.Form["RecipientSecurity" + i].ToString();
                    if (security != null)
                    {
                        if (security == "AccessCode")
                        {
                            r.AccessCode = Request.Form["RecipientSecuritySetting" + i].ToString();
                        }
                        else if (security == "PhoneAuthentication")
                        {
                            r.PhoneAuthentication = new DocuSignAPI.RecipientPhoneAuthentication();
                            r.PhoneAuthentication.RecipMayProvideNumber          = true;
                            r.PhoneAuthentication.RecipMayProvideNumberSpecified = true;
                            r.PhoneAuthentication.RecordVoicePrint          = true;
                            r.PhoneAuthentication.RecordVoicePrintSpecified = true;
                            r.IDCheckConfigurationName = "Phone Auth $";
                        }
                        else if (security == "IDCheck")
                        {
                            r.RequireIDLookup          = true;
                            r.RequireIDLookupSpecified = true;
                            r.IDCheckConfigurationName = "ID Check $";
                        }
                    }
                    r.ID   = i.ToString();
                    r.Type = DocuSignAPI.RecipientTypeCode.Signer;

                    if (Request.Form["RecipientInviteToggle" + i] == null)
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                        r.CaptiveInfo.ClientUserId = i.ToString();
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }
            return(runningList.ToArray());
        }
        private DocuSignAPI.Recipient[] ConstructRecipients()
        {
            // Construct the recipients
            List<DocuSignAPI.Recipient> runningList = new List<DocuSignAPI.Recipient>();

            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (Request.Form["RecipientName" + i] != null)
                {
                    DocuSignAPI.Recipient r = new DocuSignAPI.Recipient();
                    r.UserName = Request.Form["RecipientName" + i].ToString();
                    r.Email = Request.Form["RecipientEmail" + i].ToString();

                    // Get and set the security settings
                    string security = Request.Form["RecipientSecurity" + i].ToString();
                    if (security != null)
                    {
                        if (security == "AccessCode")
                        {
                            r.AccessCode = Request.Form["RecipientSecuritySetting" + i].ToString();
                        }
                        else if (security == "PhoneAuthentication")
                        {
                            r.PhoneAuthentication = new DocuSignAPI.RecipientPhoneAuthentication();
                            r.PhoneAuthentication.RecipMayProvideNumber = true;
                            r.PhoneAuthentication.RecipMayProvideNumberSpecified = true;
                            r.PhoneAuthentication.RecordVoicePrint = true;
                            r.PhoneAuthentication.RecordVoicePrintSpecified = true;
                            r.IDCheckConfigurationName = "Phone Auth $";
                        }
                        else if (security == "IDCheck")
                        {
                            r.RequireIDLookup = true;
                            r.RequireIDLookupSpecified = true;
                            r.IDCheckConfigurationName = "ID Check $";
                        }
                    }
                    r.ID = i.ToString();
                    r.Type = DocuSignAPI.RecipientTypeCode.Signer;

                    if (Request.Form["RecipientInviteToggle" + i] == null)
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo();
                        r.CaptiveInfo.ClientUserId = i.ToString();
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }
            return runningList.ToArray();
        }
        protected DocuSignAPI.Recipient[] ConstructRecipients()
        {
            var runningList = new List<DocuSignAPI.Recipient>();

            // Create all the recipients on the template's envelope
            for (int i = 1; i <= Request.Form.Count; i++)
            {
                if (null != Request.Form[Keys.RecipientRole + i])
                {
                    var r = new DocuSignAPI.Recipient
                        {
                            UserName = Request.Form[Keys.RecipientName + i].ToString(),
                            Email = Request.Form[Keys.RecipientEmail + i].ToString(),
                            ID = i.ToString(),
                            RoleName = Request.Form[Keys.RecipientRole + i],
                            Type = DocuSignAPI.RecipientTypeCode.Signer
                        };

                    if (null == Request.Form[Keys.RecipientInviteToggle + i])
                    {
                        // we want an embedded signer
                        r.CaptiveInfo = new DocuSignAPI.RecipientCaptiveInfo {ClientUserId = i.ToString()};
                    }
                    runningList.Add(r);
                }
                else
                {
                    break;
                }
            }

            return runningList.ToArray();
        }