int ln_null = 0;
foreach (var cl in yhFile.Elements("yhbm"))
{
if (cl.Value.ToString() == lc_yhbm)
{
cl.Remove();
ln_null = 1;
break;
}
}
if (ln_null == 0)
{
MessageBox.Show("用户编码输入错误,删除失败 !", "系统提示",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
yhFile.Save(@"C:\XMLYhsj.xml");
string lc_xml = @"C:\XMLYhsj.xml";
Network network = new Network();
network.UploadFile(lc_xml, @"ftp://100.100.0.1/yhcd1/XMLYhsj.xml",
"administrator", "1234567", false, 500);
MessageBox.Show("用户删除成功 !", "系统提示", MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
}
catch (Exception el)
{
|