infopath 数据在代码里插入重复节
现在用这个方法,把重复节的内容插入sql
XPathNavigator domNav = MainDataSource.CreateNavigator(); XPathNodeIterator rows = domNav.Select("/my:myFields/my:qj_detail", NamespaceManager); string inQjDetailSql = string.Empty; //保存请假详细信息 while (rows.MoveNext()) { string beginDate = rows.Current.SelectSingleNode("my:beginDate", NamespaceManager).Value.ToString(); string endDate = rows.Current.SelectSingleNode("my:endDate", NamespaceManager).Value.ToString(); string reson = rows.Current.SelectSingleNode("my:reson", NamespaceManager).Value.ToString(); string note = rows.Current.SelectSingleNode("my:note", NamespaceManager).Value.ToString(); inQjDetailSql += "INSERT INTO qingjia_detail (qj_id,Begin_Date,End_Date,Style,Note)"; inQjDetailSql += " VALUES ('" + qj_id + "','" + beginDate + "','" + endDate + "','" + reson + "','" + note + "');"; }