if (FormZct.lc_cdbms == string.Empty)
{
MessageBox.Show("你的用户角色没有授权 !", "系统提示",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
this.Close(); //退出此窗体进入菜单系统
}
文本框不再是窗体的活动控件时发生事件代码:
private void textBox1_Leave(object sender, EventArgs e)
{
FormZct.lc_yhbms = textBox1.Text;
XElement yhFiles = XElement.Load(@"ftp://100.100.0.1/yhcd1/XMLYhsj.xml");
int t = 0;
foreach (var p in yhFiles.Elements("yhbm"))
{
if (p.Value.ToString() == FormZct.lc_yhbms)
{
t = 1;
label3.Text = "用户姓名";
label4.Text = (string)p.Attribute("yhxm");
lc_yhmm = (string)p.Attribute("yhmm");
lc_yhxms = (string)p.Attribute("yhxm");
lc_jsmcs = (string)p.Attribute("jsmc");
lc_dwmcs = (string)p.Attribute("dwmc");
lc_jsbms = (string)p.Attribute("jsbm");
break;
}
else
{
|