如果语句/校验值?
|
我已经用谷歌浏览了一下,我知道这里的代码不是很容易接受,但是我非常感谢您的帮助:
必须选中此复选框,然后检查选项按钮的值(布尔值)。
根据该值显示不同的消息,如果True,则在邮件中包括多余的一行,但这是另一个问题。
任何帮助将不胜感激。我真的需要摆脱这个C#的困扰。
public void field42_Changed(object sender, XmlEventArgs e)
{
// checking Gsm checkbox(IOgsm@parzs.be)
if (e.NewValue.Equals(\"true\"))
{
XPathNavigator xnMyForm = this.CreateNavigator();
XmlNamespaceManager ns = this.NamespaceManager;
xnMyForm.SelectSingleNode(\"/my:myFields/my:txtGSM\", ns).SetValue(\"P.Bab@gmail.Com\");
//string MobielInternet = xnMyForm.SelectSingleNode(\"/my:myFields/my:GsmMobileInternet\", ns).Value;
if MobielInternet e.NewValue.Equals(\"true\")
MessageBox.Show(\"An e-mail for GSM with Mobile internet will be sent\");
if (e.NewValue.Equals(\"false\"))
MessageBox.Show(\"An email for the GSM will be sent\");
if (e.NewValue.Equals(\"\"))
MessageBox.Show (\" The Mobile Internet option has to been filled out \");
}
else if (e.NewValue.Equals(\"false\"))
{
XPathNavigator xnMyForm = this.CreateNavigator();
XmlNamespaceManager ns = this.NamespaceManager;
xnMyForm.SelectSingleNode(\"/my:myFields/my:txtGSM\", ns).SetValue(\"\");
}
}
没有找到相关结果
已邀请:
1 个回复
慷祈霖黑