【发布时间】:2015-10-06 19:06:08
【问题描述】:
我对 DocuSign 的世界还很陌生,我正在尝试为多个收件人填充标签,这些收件人在 DocuSign 的特定服务器模板中设置了不同的文档。这些文档中的选项卡名称相同。
下面的代码将毫无问题地为收件人 1 填充文档中的选项卡,这很有意义,因为我将选项卡的收件人值设置为 1。但是,我不知道如何使用这些选项卡来填充发送给收件人 2 和 3 的文档。我尝试循环遍历数组中的收件人并以这种方式设置收件人 ID,但这只会使文档中的选项卡变为空白。
Type MyClassType = MyClass.GetType();
//add all the neccessary instances of the DocuSignWeb.TAB object into a dictionary
//giving each one a unique name based on the property it represents
var tabNames = new Dictionary<string, DocuSignWeb.Tab>();
foreach (PropertyInfo propertyInfoTabs in MyClassType.GetProperties())
{
string tabName = propertyInfoTabs.Name;
tabNames.Add(tabName, new DocuSignWeb.Tab());
}
//dynamically populate each tab with the relevant data
//and add each one to a list.
List<DocuSignWeb.Tab> tabs = new List<DocuSignWeb.Tab>();
foreach (PropertyInfo propertyInfo in MyClassType .GetProperties())
{
DocuSignWeb.Tab t = tabNames[propertyInfo.Name];
t.TabLabel = propertyInfo.Name;
t.Value = Convert.ToString(propertyInfo.GetValue(MyClass, null));
//document info is defined in server template
t.RecipientID = "1";
t.TemplateLocked = true;
t.Type = TabTypeCode.Custom;
t.CustomTabLocked = true;
t.CustomTabDisableAutoSize = true;
t.CustomTabWidth = 20;
tabs.Add(t);
}
inlineTemplate.Envelope.Tabs = tabs.ToArray();
如果有人这样做并且可以提供帮助,我将不胜感激。
【问题讨论】:
标签: c# docusignapi