/// <summary> /// /// </summary> /// <param name="guildID"></param> /// <returns></returns> public static List <GuildEntry> GetGuildInfo(int guildID) { List <GuildEntry> Guild = new List <GuildEntry>(); SqlWrapper ms = new SqlWrapper(); string SqlQuery = "SELECT * FROM `organizations` WHERE ID=" + "'" + guildID + "'"; DataTable dt = ms.ReadDatatable(SqlQuery); foreach (DataRow row in dt.Rows) { GuildEntry guildEntry = new GuildEntry(); guildEntry.guildID = (UInt32)row["ID"]; guildEntry.creation = (DateTime)row["creation"]; guildEntry.Name = (string)row["Name"]; guildEntry.LeaderID = (Int32)row["LeaderID"]; guildEntry.GovernmentForm = (Int32)row["GovernmentForm"]; guildEntry.Description = (string)row["Description"]; guildEntry.Objective = (string)row["Objective"]; guildEntry.History = (string)row["History"]; guildEntry.Tax = (Int32)row["Tax"]; guildEntry.Bank = (UInt64)row["Bank"]; guildEntry.Comission = (Int32)row["Comission"]; guildEntry.ContractsID = (Int32)row["ContractsID"]; guildEntry.TowerFieldID = (Int32)row["TowerfieldID"]; Guild.Add(guildEntry); } return(Guild); }
/// <summary> /// /// </summary> /// <param name="guildID"></param> /// <returns></returns> public static List<GuildEntry> GetGuildInfo(int guildID) { List<GuildEntry> Guild = new List<GuildEntry>(); SqlWrapper ms = new SqlWrapper(); string SqlQuery = "SELECT * FROM `organizations` WHERE ID=" + "'" + guildID + "'"; DataTable dt = ms.ReadDatatable(SqlQuery); foreach (DataRow row in dt.Rows) { GuildEntry guildEntry = new GuildEntry(); guildEntry.guildID = (UInt32) row["ID"]; guildEntry.creation = (DateTime) row["creation"]; guildEntry.Name = (string) row["Name"]; guildEntry.LeaderID = (Int32) row["LeaderID"]; guildEntry.GovernmentForm = (Int32) row["GovernmentForm"]; guildEntry.Description = (string) row["Description"]; guildEntry.Objective = (string) row["Objective"]; guildEntry.History = (string) row["History"]; guildEntry.Tax = (Int32) row["Tax"]; guildEntry.Bank = (UInt64) row["Bank"]; guildEntry.Comission = (Int32) row["Comission"]; guildEntry.ContractsID = (Int32) row["ContractsID"]; guildEntry.TowerFieldID = (Int32) row["TowerfieldID"]; Guild.Add(guildEntry); } return Guild; }