ext.net 的X.Msg.Confirm问题
追豆豆的人 2011-11-22 01:09:58 X.Msg.Confirm("Message", "Confirm?", new MessageBoxButtonsConfig
{
Yes = new MessageBoxButtonConfig
{
Handler=
Text = "确定"
},
No = new MessageBoxButtonConfig
{
Handler = "CompanyX.DoNo()",
Text = "取消"
}
}).Show();
public void DoYes()
{
int count = 0;
string month = "1";
XmlDocument xmld = new XmlDocument();
xmld.Load(Server.MapPath(@"~\FormationXml.xml"));
XmlNode xn = xmld.SelectSingleNode("type");
foreach (XmlNode xmln in xmld.SelectSingleNode("type").ChildNodes)
{
XmlNodeList xnl = xmln.ChildNodes;
for (int i = 0; i < xnl.Count; i++)
{
XmlElement xmle = (XmlElement)xnl.Item(i);
if (xmle.Name == "month")
{
if (xmle.InnerText == month)
{
xn.RemoveChild(xmln);
count++;
}
}
}
}
xmld.Save(Server.MapPath(@"~\FormationXml.xml"));
this.res.AddScript("Ext.Msg.notify('删除提示框', '你删除了一条记录!');");
}
当点击确认的时候我想调用下面的DoYes()方法,这两个都写在后台,请我我改怎么写?