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)
{
MessageBox.Show("用户修改失败 !" + el.Message, "系统提示",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
}
单击按钮事件中介绍用户删除并存入XML文件代码:
private void button2_Click(object sender, EventArgs e)
{
string lc_yhbm = textBox1.Text.Trim();
XElement yhFile = XElement.Load(@"ftp://100.100.0.1/yhcd1/XMLYhsj.xml");
try
{
|