public static double GetGYHById(int id,String Colname1,String Colname2)
{
double GYH = 0;
String path = "GYH.XML";
Document xdoc = new Document();
xdoc.Load(path);
XmlNodeList xlist = xdoc.GetElementsByTagName("type");
foreach(XmlNode xnode in xlist)
{
if(xnode.Attributes[Colname1].Value == id.ToString())
{
GYH = Convert.ToDouble(xnode.Attributes[Colname2].Value);
}
}
return GYH;
}
{
double GYH = 0;
String path = "GYH.XML";
Document xdoc = new Document();
xdoc.Load(path);
XmlNodeList xlist = xdoc.GetElementsByTagName("type");
foreach(XmlNode xnode in xlist)
{
if(xnode.Attributes[Colname1].Value == id.ToString())
{
GYH = Convert.ToDouble(xnode.Attributes[Colname2].Value);
}
}
return GYH;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货