示例#1
0
 public static XElement CreateStrengthenInfo(StrengthenInfo info)
 {
     return new XElement("Item", new XAttribute("StrengthenLevel", info.StrengthenLevel),
         new XAttribute("Rock", info.Rock),
     //Rock1="2"
     new XAttribute("Rock1", info.Rock1),
     // Rock2="2"
     new XAttribute("Rock2", info.Rock2),
     //Rock3="2"
     new XAttribute("Rock3", info.Rock3),
     //StoneLevelMin="1"
     new XAttribute("StoneLevelMin", info.StoneLevelMin));
 }
示例#2
0
 public StrengthenInfo[] GetAllStrengthen()
 {
     List<StrengthenInfo> infos = new List<StrengthenInfo>();
     SqlDataReader reader = null;
     try
     {
         db.GetReader(ref reader, "SP_Item_Strengthen_All");
         while (reader.Read())
         {
             StrengthenInfo info = new StrengthenInfo();
             info.StrengthenLevel = (int)reader["StrengthenLevel"];
             info.Random = (int)reader["Random"];
             info.Rock = (int)reader["Rock"];
             info.Rock1 = (int)reader["Rock1"];
             info.Rock2 = (int)reader["Rock2"];
             info.Rock3 = (int)reader["Rock3"];
             info.StoneLevelMin = (int)reader["StoneLevelMin"];
             infos.Add(info);
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("GetAllStrengthen", e);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
     return infos.ToArray();
 }