我的表单中有一个日期选择器。它的形式简单,没有以这种形式添加的规则和数据源。此模板用于表单库(非自定义列表)
我有VSTA项目作为代码的后端,我的问题是:
答案 0 :(得分:0)
见下面的代码:
XPathNavigator myNav = this.MainDataSource.CreateNavigator();
XPathNavigator workflowDataNav = this.DataSources[0].CreateNavigator();
XPathNavigator newNode = myNav.SelectSingleNode("//my:field7", this.NamespaceManager);
if (newNode.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
newNode.DeleteSelf();
newNode.SetValue(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd"));
您是否看过以下广告: How to: Debug Browser-Enabled Forms Deployed on InfoPath Form Services
How to: Preview and Debug InfoPath Managed Code Form Templates