A
Albator
Hi,
I have some probleme with managed C# code!
What I wan't to do on is on onbeforechange event test if the value of
the field was empty I make an action if not I don't wan't to do that!
my code:
[InfoPathEventHandler(MatchPath="/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz",
EventType=InfoPathEventType.OnBeforeChange)]
public void Notiz_OnBeforeChange(DataDOMEvent e)
{
if
(thisXDocument.DOM.selectSingleNode("/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz").text
== "")
{
thisXDocument.DOM.selectSingleNode("/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz/@Eintrag").text=
DateTime.Now.ToString();}
}
The probleme is if I make this condition the result is never true!
How I can do?
Thanks for your help
I have some probleme with managed C# code!
What I wan't to do on is on onbeforechange event test if the value of
the field was empty I make an action if not I don't wan't to do that!
my code:
[InfoPathEventHandler(MatchPath="/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz",
EventType=InfoPathEventType.OnBeforeChange)]
public void Notiz_OnBeforeChange(DataDOMEvent e)
{
if
(thisXDocument.DOM.selectSingleNode("/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz").text
== "")
{
thisXDocument.DOM.selectSingleNode("/ns1:Case/ns1:Geschaeft/ns1:Notizen/ns1:Notiz/@Eintrag").text=
DateTime.Now.ToString();}
}
The probleme is if I make this condition the result is never true!
How I can do?
Thanks for your help