Why don't you just do something like this:
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section1", EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection1_OnAfterChange(DataDOMEvent e)
{
TermSheetSection_OnAfterChange(e);
}
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section2", EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection2_OnAfterChange(DataDOMEvent e)
{
TermSheetSection_OnAfterChange(e);
}
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section3", EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{
return;
}
if (e.Parent.selectSingleNode("NS:IxIsChanged").text == "false")
{
e.Parent.selectSingleNode("NS:IxIsChanged").text == "true";
}
}

Signature
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
The compiler is giving me an error in this code:
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section1", EventType=InfoPathEventType.OnAfterChange)]
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section2", EventType=InfoPathEventType.OnAfterChange)]
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section3", EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{
return;
}
if (e.Parent.selectSingleNode("NS:IxIsChanged").text == "false")
{
e.Parent.selectSingleNode("NS:IxIsChanged").text == "true";
}
}
Is there any workaround?
Thank you
G. Tarazi - 27 Jul 2004 20:39 GMT
Thanks for the help, this is what I did, And I end up with 1000 lines of
code :-) , beautiful nice code that does nothing :-), except handling the
events, All the same
Why don't you just do something like this:
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section1",
EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection1_OnAfterChange(DataDOMEvent e)
{
TermSheetSection_OnAfterChange(e);
}
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section2",
EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection2_OnAfterChange(DataDOMEvent e)
{
TermSheetSection_OnAfterChange(e);
}
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section3",
EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{
return;
}
if (e.Parent.selectSingleNode("NS:IxIsChanged").text == "false")
{
e.Parent.selectSingleNode("NS:IxIsChanged").text == "true";
}
}

Signature
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
"G. Tarazi" <Tarazi (at) LiveTechnologies.ca> wrote in message
news:%23o2QOC1cEHA.4092@TK2MSFTNGP10.phx.gbl...
The compiler is giving me an error in this code:
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section1",
EventType=InfoPathEventType.OnAfterChange)]
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section2",
EventType=InfoPathEventType.OnAfterChange)]
[InfoPathEventHandler(MatchPath="/NS:DxIPForm/NS:IPForm/NS:section3",
EventType=InfoPathEventType.OnAfterChange)]
public void TermSheetSection_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{
return;
}
if (e.Parent.selectSingleNode("NS:IxIsChanged").text == "false")
{
e.Parent.selectSingleNode("NS:IxIsChanged").text == "true";
}
}
Is there any workaround?
Thank you