public DataSettingWebService()
{
this
this
this
}
添加元素
public bool CreateNewUser(string userName
{
try{
if (userName ==
{
return false;
}
XmlElement root = doc
XmlElement newUser = doc
newUser
newUser
newUser
newUser
for (int i =
{
XmlElement newLevel = doc
newLevel
newLevel
newLevel
newLevel
newLevel
newUser
}
root
doc
return true ;
}
catch
{
return false ;
}
}
修改更新屬性值
public bool UpdateUserGrade(string userName
{
bool IsAbilityLevelChange = false;
XmlNodeList nodelist = doc
foreach (XmlNode xdu in nodelist)
{
if (xdu
{
XmlElement xeu = xdu as XmlElement;
if (levelId > Convert
{
xeu
IsAbilityLevelChange = true;
}
nodelist = xeu
foreach (XmlNode xdl in nodelist)
{
if (xdl
{
if (score > Convert
{
XmlElement xel = xdl as XmlElement;
xel
xel
xel
xel
}
break;
}
}
break;
}
}
doc
return IsAbilityLevelChange;
}
From:http://tw.wingwit.com/Article/program/net/201311/12271.html