1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| sing Microsoft.Office.InfoPath;
using System;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using mshtml;
namespace Template1
{
public partial class FormCode
{
// Member variables are not supported in browser-enabled forms.
// Instead, write and read these values from the FormState
// dictionary using code such as the following:
//
// private object _memberVariable
// {
// get
// {
// return FormState["_memberVariable"];
// }
// set
// {
// FormState["_memberVariable"] = value;
// }
// }
// NOTE: The following procedure is required by Microsoft Office InfoPath.
// It can be modified using Microsoft Office InfoPath.
public void InternalStartup()
{
EventManager.XmlEvents["/dfs:myFields/dfs:dataFields/dfs:Service/@Service", "Service"].Changed += new XmlChangedEventHandler(Service__Service_attr_Changed);
}
public void Service__Service_attr_Changed(object sender, XmlEventArgs e)
{
//tu sélectionne toutes les données renvoyées par ta dataconnection
Datacomplet = DataSources["DataConnection"].CreateNavigator().SelectSingleNode("//dfs":dataFields", NamespaceManager);
//tu filtres ce que tu veux
DataFiltre = DataSources["DataConnection"].CreateNavigator().SelectSingleNode("//dfs":dataFields[champ='toto']", NamespaceManager);
//Tu enlèves tout les éléments que tu as dans ton Datacomplet.
//Tu rajoutes ensuite les éléments que tu as sélectionné dans ton datafiltre
}
}
} |
Partager