mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
source code checkin
This commit is contained in:
parent
5f8fb2c825
commit
7e57b72e35
675 changed files with 168433 additions and 0 deletions
34
src/ConanData/DataAccess/AccountDataAccess.cs
Normal file
34
src/ConanData/DataAccess/AccountDataAccess.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using ConanData.DataAccess.Base;
|
||||
using ConanData.Database;
|
||||
using ConanData.Datasets;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
namespace ConanData.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Inherited data access class to perform customized Fetches, Deletes, Inserts
|
||||
/// and Updates on table account
|
||||
/// </summary>
|
||||
internal class AccountDataAccess : AccountDataAccessBase
|
||||
{
|
||||
public AccountDataAccess(Connection connection)
|
||||
: base(connection)
|
||||
{
|
||||
}
|
||||
|
||||
public AccountDataSet FetchDataSetOnlineOnly()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
sql.AppendFormat("WHERE [{0}].[{1}] <> 0 ", TABLE__NAME, COLUMN__ONLINE);
|
||||
|
||||
AccountDataSet dataSet = new AccountDataSet();
|
||||
connection.FillDataSet(sql.ToString(), null, CommandType.Text, 300, dataSet, new String[] { TABLE__NAME });
|
||||
return dataSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
104
src/ConanData/DataAccess/Base/AccountDataAccessBase.cs
Normal file
104
src/ConanData/DataAccess/Base/AccountDataAccessBase.cs
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a code generation tool.
|
||||
// Date generated: 14/05/2018 17:05:24
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using ConanData.Database;
|
||||
using ConanData.Datasets;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.OleDb;
|
||||
using System.Text;
|
||||
|
||||
namespace ConanData.DataAccess.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Data access class to perform Fetches, Deletes, Inserts and Updates
|
||||
/// on table account
|
||||
/// </summary>
|
||||
internal class AccountDataAccessBase
|
||||
{
|
||||
#region Constants
|
||||
|
||||
internal const String SCHEMA__NAME = "";
|
||||
internal const String TABLE__NAME = "account";
|
||||
|
||||
internal const String COLUMN__ID = "id";
|
||||
internal const String COLUMN__USER = "user";
|
||||
internal const String COLUMN__ONLINE = "online";
|
||||
|
||||
#endregion
|
||||
|
||||
private Connection _connection = null;
|
||||
|
||||
public AccountDataAccessBase(Connection connection)
|
||||
{
|
||||
_connection = connection;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
public Connection Connection => _connection;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch Typed DataSets
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into a typed dataset from the
|
||||
/// table account
|
||||
/// </summary>
|
||||
/// <returns>A populated typed dataset</returns>
|
||||
public AccountDataSet FetchDataSetAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
AccountDataSet dataSet = new AccountDataSet();
|
||||
connection.FillDataSet(sql.ToString(), null, CommandType.Text, 300, dataSet, new String[] { TABLE__NAME });
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch DataTables
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into an untyped datatable from the
|
||||
/// table account
|
||||
/// </summary>
|
||||
/// <returns>A populated untyped datatable</returns>
|
||||
public DataTable FetchDataTableAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
return connection.ExecuteDataTable(sql.ToString(), null, CommandType.Text, 300, TABLE__NAME);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Support Methods
|
||||
|
||||
protected String GetSelect()
|
||||
{
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.AppendFormat("SELECT [{0}].[{1}] AS [AccountId],", TABLE__NAME, COLUMN__ID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [User],", TABLE__NAME, COLUMN__USER);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [Online] ", TABLE__NAME, COLUMN__ONLINE);
|
||||
sql.AppendFormat("FROM {0}[{1}] ", SCHEMA__NAME, TABLE__NAME);
|
||||
return sql.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
106
src/ConanData/DataAccess/Base/CharacterStatsDataAccessBase.cs
Normal file
106
src/ConanData/DataAccess/Base/CharacterStatsDataAccessBase.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a code generation tool.
|
||||
// Date generated: 14/05/2018 17:05:24
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using ConanData.Database;
|
||||
using ConanData.Datasets;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.OleDb;
|
||||
using System.Text;
|
||||
|
||||
namespace ConanData.DataAccess.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Data access class to perform Fetches, Deletes, Inserts and Updates
|
||||
/// on table character_stats
|
||||
/// </summary>
|
||||
internal class CharacterStatsDataAccessBase
|
||||
{
|
||||
#region Constants
|
||||
|
||||
internal const String SCHEMA__NAME = "";
|
||||
internal const String TABLE__NAME = "character_stats";
|
||||
|
||||
internal const String COLUMN__CHARID = "char_id";
|
||||
internal const String COLUMN__STATTYPE = "stat_type";
|
||||
internal const String COLUMN__STATID = "stat_id";
|
||||
internal const String COLUMN__STATVALUE = "stat_value";
|
||||
|
||||
#endregion
|
||||
|
||||
private Connection _connection = null;
|
||||
|
||||
public CharacterStatsDataAccessBase(Connection connection)
|
||||
{
|
||||
_connection = connection;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
public Connection Connection => _connection;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch Typed DataSets
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into a typed dataset from the
|
||||
/// table character_stats
|
||||
/// </summary>
|
||||
/// <returns>A populated typed dataset</returns>
|
||||
public CharacterStatsDataSet FetchDataSetAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
CharacterStatsDataSet dataSet = new CharacterStatsDataSet();
|
||||
connection.FillDataSet(sql.ToString(), null, CommandType.Text, 300, dataSet, new String[] { TABLE__NAME });
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch DataTables
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into an untyped datatable from the
|
||||
/// table character_stats
|
||||
/// </summary>
|
||||
/// <returns>A populated untyped datatable</returns>
|
||||
public DataTable FetchDataTableAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
return connection.ExecuteDataTable(sql.ToString(), null, CommandType.Text, 300, TABLE__NAME);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Support Methods
|
||||
|
||||
protected String GetSelect()
|
||||
{
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.AppendFormat("SELECT [{0}].[{1}] AS [CharacterId],", TABLE__NAME, COLUMN__CHARID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [StatType],", TABLE__NAME, COLUMN__STATTYPE);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [StatId],", TABLE__NAME, COLUMN__STATID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [StatValue] ", TABLE__NAME, COLUMN__STATVALUE);
|
||||
sql.AppendFormat("FROM {0}[{1}] ", SCHEMA__NAME, TABLE__NAME);
|
||||
return sql.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
114
src/ConanData/DataAccess/Base/CharactersDataAccessBase.cs
Normal file
114
src/ConanData/DataAccess/Base/CharactersDataAccessBase.cs
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a code generation tool.
|
||||
// Date generated: 14/05/2018 17:05:24
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using ConanData.Database;
|
||||
using ConanData.Datasets;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.OleDb;
|
||||
using System.Text;
|
||||
|
||||
namespace ConanData.DataAccess.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Data access class to perform Fetches, Deletes, Inserts and Updates
|
||||
/// on table characters
|
||||
/// </summary>
|
||||
internal class CharactersDataAccessBase
|
||||
{
|
||||
#region Constants
|
||||
|
||||
internal const String SCHEMA__NAME = "";
|
||||
internal const String TABLE__NAME = "characters";
|
||||
|
||||
internal const String COLUMN__PLAYERID = "playerId";
|
||||
internal const String COLUMN__ID = "id";
|
||||
internal const String COLUMN__CHARNAME = "char_name";
|
||||
internal const String COLUMN__LEVEL = "level";
|
||||
internal const String COLUMN__RANK = "rank";
|
||||
internal const String COLUMN__GUILD = "guild";
|
||||
internal const String COLUMN__ISALIVE = "isAlive";
|
||||
internal const String COLUMN__LASTTIMEONLINE = "lastTimeOnline";
|
||||
|
||||
#endregion
|
||||
|
||||
private Connection _connection = null;
|
||||
|
||||
public CharactersDataAccessBase(Connection connection)
|
||||
{
|
||||
_connection = connection;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
public Connection Connection => _connection;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch Typed DataSets
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into a typed dataset from the
|
||||
/// table characters
|
||||
/// </summary>
|
||||
/// <returns>A populated typed dataset</returns>
|
||||
public CharactersDataSet FetchDataSetAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
CharactersDataSet dataSet = new CharactersDataSet();
|
||||
connection.FillDataSet(sql.ToString(), null, CommandType.Text, 300, dataSet, new String[] { TABLE__NAME });
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch DataTables
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into an untyped datatable from the
|
||||
/// table characters
|
||||
/// </summary>
|
||||
/// <returns>A populated untyped datatable</returns>
|
||||
public DataTable FetchDataTableAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
return connection.ExecuteDataTable(sql.ToString(), null, CommandType.Text, 300, TABLE__NAME);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Support Methods
|
||||
|
||||
protected String GetSelect()
|
||||
{
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.AppendFormat("SELECT CAST([{0}].[{1}] AS BIGINT) AS [AccountId],", TABLE__NAME, COLUMN__PLAYERID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [CharacterId],", TABLE__NAME, COLUMN__ID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [CharacterName],", TABLE__NAME, COLUMN__CHARNAME);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [Level],", TABLE__NAME, COLUMN__LEVEL);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [Rank],", TABLE__NAME, COLUMN__RANK);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [GuildId],", TABLE__NAME, COLUMN__GUILD);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [IsAlive],", TABLE__NAME, COLUMN__ISALIVE);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [LastTimeOnline] ", TABLE__NAME, COLUMN__LASTTIMEONLINE);
|
||||
sql.AppendFormat("FROM {0}[{1}] ", SCHEMA__NAME, TABLE__NAME);
|
||||
return sql.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
110
src/ConanData/DataAccess/Base/GuildsDataAccessBase.cs
Normal file
110
src/ConanData/DataAccess/Base/GuildsDataAccessBase.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a code generation tool.
|
||||
// Date generated: 14/05/2018 17:05:24
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using ConanData.Database;
|
||||
using ConanData.Datasets;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.OleDb;
|
||||
using System.Text;
|
||||
|
||||
namespace ConanData.DataAccess.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Data access class to perform Fetches, Deletes, Inserts and Updates
|
||||
/// on table guilds
|
||||
/// </summary>
|
||||
internal class GuildsDataAccessBase
|
||||
{
|
||||
#region Constants
|
||||
|
||||
internal const String SCHEMA__NAME = "";
|
||||
internal const String TABLE__NAME = "guilds";
|
||||
|
||||
internal const String COLUMN__GUILDID = "guildId";
|
||||
internal const String COLUMN__NAME = "name";
|
||||
internal const String COLUMN__MESSAGEOFTHEDAY = "messageOfTheDay";
|
||||
internal const String COLUMN__OWNER = "owner";
|
||||
internal const String COLUMN__NAMELASTCHANGEDBY = "nameLastChangedBy";
|
||||
internal const String COLUMN__MOTDLASTCHANGEDBY = "motdLastChangedBy";
|
||||
|
||||
#endregion
|
||||
|
||||
private Connection _connection = null;
|
||||
|
||||
public GuildsDataAccessBase(Connection connection)
|
||||
{
|
||||
_connection = connection;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
||||
public Connection Connection => _connection;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch Typed DataSets
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into a typed dataset from the
|
||||
/// table guilds
|
||||
/// </summary>
|
||||
/// <returns>A populated typed dataset</returns>
|
||||
public GuildsDataSet FetchDataSetAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
GuildsDataSet dataSet = new GuildsDataSet();
|
||||
connection.FillDataSet(sql.ToString(), null, CommandType.Text, 300, dataSet, new String[] { TABLE__NAME });
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fetch DataTables
|
||||
|
||||
/// <summary>
|
||||
/// Fetches all the records into an untyped datatable from the
|
||||
/// table guilds
|
||||
/// </summary>
|
||||
/// <returns>A populated untyped datatable</returns>
|
||||
public DataTable FetchDataTableAll()
|
||||
{
|
||||
Connection connection = Connection;
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.Append(GetSelect());
|
||||
|
||||
return connection.ExecuteDataTable(sql.ToString(), null, CommandType.Text, 300, TABLE__NAME);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Support Methods
|
||||
|
||||
protected String GetSelect()
|
||||
{
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.AppendFormat("SELECT [{0}].[{1}] AS [GuildId],", TABLE__NAME, COLUMN__GUILDID);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [Name],", TABLE__NAME, COLUMN__NAME);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [MessageOfTheDay],", TABLE__NAME, COLUMN__MESSAGEOFTHEDAY);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [OwnerId],", TABLE__NAME, COLUMN__OWNER);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [NameLastChangedBy],", TABLE__NAME, COLUMN__NAMELASTCHANGEDBY);
|
||||
sql.AppendFormat("[{0}].[{1}] AS [MotdLastChangedBy] ", TABLE__NAME, COLUMN__MOTDLASTCHANGEDBY);
|
||||
sql.AppendFormat("FROM {0}[{1}] ", SCHEMA__NAME, TABLE__NAME);
|
||||
return sql.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
17
src/ConanData/DataAccess/CharacterStatsDataAccess.cs
Normal file
17
src/ConanData/DataAccess/CharacterStatsDataAccess.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using ConanData.DataAccess.Base;
|
||||
using ConanData.Database;
|
||||
|
||||
namespace ConanData.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Inherited data access class to perform customized Fetches, Deletes, Inserts
|
||||
/// and Updates on table character_stats
|
||||
/// </summary>
|
||||
internal class CharacterStatsDataAccess : CharacterStatsDataAccessBase
|
||||
{
|
||||
public CharacterStatsDataAccess(Connection connection)
|
||||
: base(connection)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
17
src/ConanData/DataAccess/CharactersDataAccess.cs
Normal file
17
src/ConanData/DataAccess/CharactersDataAccess.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using ConanData.DataAccess.Base;
|
||||
using ConanData.Database;
|
||||
|
||||
namespace ConanData.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Inherited data access class to perform customized Fetches, Deletes, Inserts
|
||||
/// and Updates on table characters
|
||||
/// </summary>
|
||||
internal class CharactersDataAccess : CharactersDataAccessBase
|
||||
{
|
||||
public CharactersDataAccess(Connection connection)
|
||||
: base(connection)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
17
src/ConanData/DataAccess/GuildsDataAccess.cs
Normal file
17
src/ConanData/DataAccess/GuildsDataAccess.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using ConanData.DataAccess.Base;
|
||||
using ConanData.Database;
|
||||
|
||||
namespace ConanData.DataAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Inherited data access class to perform customized Fetches, Deletes, Inserts
|
||||
/// and Updates on table guilds
|
||||
/// </summary>
|
||||
internal class GuildsDataAccess : GuildsDataAccessBase
|
||||
{
|
||||
public GuildsDataAccess(Connection connection)
|
||||
: base(connection)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue