mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add XML documentation.
This commit is contained in:
@@ -27,22 +27,51 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
||||||
namespace Cicm.Database
|
namespace Cicm.Database
|
||||||
{
|
{
|
||||||
|
/// <summary>Interface to database</summary>
|
||||||
public interface IDbCore
|
public interface IDbCore
|
||||||
{
|
{
|
||||||
|
/// <summary>Database operations</summary>
|
||||||
Operations Operations { get; }
|
Operations Operations { get; }
|
||||||
|
|
||||||
|
/// <summary>Last inserted row's ID</summary>
|
||||||
long LastInsertRowId { get; }
|
long LastInsertRowId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Opens an existing database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="server">Server</param>
|
||||||
|
/// <param name="user">User</param>
|
||||||
|
/// <param name="database">Database name</param>
|
||||||
|
/// <param name="password">Password</param>
|
||||||
|
/// <param name="port">Port</param>
|
||||||
|
/// <returns><c>true</c> if database opened correctly, <c>false</c> otherwise</returns>
|
||||||
bool OpenDb(string server, string user, string database, string password, ushort port);
|
bool OpenDb(string server, string user, string database, string password, ushort port);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the database
|
||||||
|
/// </summary>
|
||||||
void CloseDb();
|
void CloseDb();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="server">Server</param>
|
||||||
|
/// <param name="user">User</param>
|
||||||
|
/// <param name="database">Database name</param>
|
||||||
|
/// <param name="password">Password</param>
|
||||||
|
/// <param name="port">Port</param>
|
||||||
|
/// <returns><c>true</c> if database is created correctly, <c>false</c> otherwise</returns>
|
||||||
bool CreateDb(string database, string server, string user, string password, ushort port);
|
bool CreateDb(string database, string server, string user, string password, ushort port);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a data adapter for the opened database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Data adapter</returns>
|
||||||
IDbDataAdapter GetNewDataAdapter();
|
IDbDataAdapter GetNewDataAdapter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using MySql.Data.MySqlClient;
|
using MySql.Data.MySqlClient;
|
||||||
@@ -45,7 +46,10 @@ namespace Cicm.Database
|
|||||||
connection = new MySqlConnection(connectionString);
|
connection = new MySqlConnection(connectionString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Database operations</summary>
|
||||||
public Operations Operations { get; private set; }
|
public Operations Operations { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>Last inserted row's ID</summary>
|
||||||
public long LastInsertRowId
|
public long LastInsertRowId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -62,6 +66,15 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Opens an existing database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="server">Server</param>
|
||||||
|
/// <param name="user">User</param>
|
||||||
|
/// <param name="database">Database name</param>
|
||||||
|
/// <param name="password">Password</param>
|
||||||
|
/// <param name="port">Port</param>
|
||||||
|
/// <returns><c>true</c> if database opened correctly, <c>false</c> otherwise</returns>
|
||||||
public bool OpenDb(string server, string user, string database, string password, ushort port = 3306)
|
public bool OpenDb(string server, string user, string database, string password, ushort port = 3306)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -89,12 +102,24 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the database
|
||||||
|
/// </summary>
|
||||||
public void CloseDb()
|
public void CloseDb()
|
||||||
{
|
{
|
||||||
connection?.Close();
|
connection?.Close();
|
||||||
connection = null;
|
connection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="server">Server</param>
|
||||||
|
/// <param name="user">User</param>
|
||||||
|
/// <param name="database">Database name</param>
|
||||||
|
/// <param name="password">Password</param>
|
||||||
|
/// <param name="port">Port</param>
|
||||||
|
/// <returns><c>true</c> if database is created correctly, <c>false</c> otherwise</returns>
|
||||||
public bool CreateDb(string database, string server, string user, string password, ushort port = 3306)
|
public bool CreateDb(string database, string server, string user, string password, ushort port = 3306)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -128,6 +153,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a data adapter for the opened database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Data adapter</returns>
|
||||||
public IDbDataAdapter GetNewDataAdapter()
|
public IDbDataAdapter GetNewDataAdapter()
|
||||||
{
|
{
|
||||||
return new MySqlDataAdapter();
|
return new MySqlDataAdapter();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all admins
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All admins</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetAdmins(out List<Admin> entries)
|
public bool GetAdmins(out List<Admin> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of admins since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of admins</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetAdmins(out List<Admin> entries, ulong start, ulong count)
|
public bool GetAdmins(out List<Admin> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets admin by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Admin with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Admin GetAdmin(int id)
|
public Admin GetAdmin(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of administrators in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountAdmins()
|
public long CountAdmins()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new administrator to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddAdmin(Admin entry, out long id)
|
public bool AddAdmin(Admin entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an administrator in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateAdmin(Admin entry)
|
public bool UpdateAdmin(Admin entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes an administrator from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveAdmin(long id)
|
public bool RemoveAdmin(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all browser tests
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All browser tests</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetBrowserTests(out List<BrowserTest> entries)
|
public bool GetBrowserTests(out List<BrowserTest> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of browser tests since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of browser tests</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetBrowserTests(out List<BrowserTest> entries, ulong start, ulong count)
|
public bool GetBrowserTests(out List<BrowserTest> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets browser test by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Browser test with specified id, <c>null</c> if not found or error</returns>
|
||||||
public BrowserTest GetBrowserTest(int id)
|
public BrowserTest GetBrowserTest(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of browser tests in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountBrowserTests()
|
public long CountBrowserTests()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new browser test to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddBrowserTest(BrowserTest entry, out long id)
|
public bool AddBrowserTest(BrowserTest entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -169,6 +197,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a browser test in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateBrowserTest(BrowserTest entry)
|
public bool UpdateBrowserTest(BrowserTest entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -193,6 +226,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a browser test from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveBrowserTest(long id)
|
public bool RemoveBrowserTest(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all companies
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All companies</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetCompanies(out List<Company> entries)
|
public bool GetCompanies(out List<Company> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of companies since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of companies</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetCompanies(out List<Company> entries, ulong start, ulong count)
|
public bool GetCompanies(out List<Company> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets company by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Company with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Company GetCompany(int id)
|
public Company GetCompany(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of companies in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountCompanies()
|
public long CountCompanies()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new company to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddCompany(Company entry, out long id)
|
public bool AddCompany(Company entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a company in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateCompany(Company entry)
|
public bool UpdateCompany(Company entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a company from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveCompany(long id)
|
public bool RemoveCompany(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all computers
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All computers</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetComputers(out List<Computer> entries)
|
public bool GetComputers(out List<Computer> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of computers since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of computers</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetComputers(out List<Computer> entries, ulong start, ulong count)
|
public bool GetComputers(out List<Computer> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets computer by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Computer with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Computer GetComputer(int id)
|
public Computer GetComputer(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of computers in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountComputers()
|
public long CountComputers()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new administrator to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddComputer(Computer entry, out long id)
|
public bool AddComputer(Computer entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -169,6 +197,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a computer in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateComputer(Computer entry)
|
public bool UpdateComputer(Computer entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -194,6 +227,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a computer from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveComputer(long id)
|
public bool RemoveComputer(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -36,6 +37,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all consoles
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All consoles</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetConsoles(out List<Console> entries)
|
public bool GetConsoles(out List<Console> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -66,6 +72,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of videogame consoles since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of videogame consoles</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetConsoles(out List<Console> entries, ulong start, ulong count)
|
public bool GetConsoles(out List<Console> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -96,6 +109,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets videogame console by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Videogame console with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Console GetConsole(int id)
|
public Console GetConsole(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -125,6 +143,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of videogame consoles in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountConsoles()
|
public long CountConsoles()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -139,6 +161,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new videogame console to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddConsole(Console entry, out long id)
|
public bool AddConsole(Console entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -168,6 +196,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an videogame console in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateConsole(Console entry)
|
public bool UpdateConsole(Console entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -193,6 +226,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a videogame console from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveConsole(long id)
|
public bool RemoveConsole(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all console companies
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All console companies</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetConsoleCompanies(out List<ConsoleCompany> entries)
|
public bool GetConsoleCompanies(out List<ConsoleCompany> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of console companies since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of console companies</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetConsoleCompanies(out List<ConsoleCompany> entries, ulong start, ulong count)
|
public bool GetConsoleCompanies(out List<ConsoleCompany> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets console company by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Console company with specified id, <c>null</c> if not found or error</returns>
|
||||||
public ConsoleCompany GetConsoleCompany(int id)
|
public ConsoleCompany GetConsoleCompany(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of console companies in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountConsoleCompanies()
|
public long CountConsoleCompanies()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new console company to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddConsoleCompany(ConsoleCompany entry, out long id)
|
public bool AddConsoleCompany(ConsoleCompany entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a console company in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateConsoleCompany(ConsoleCompany entry)
|
public bool UpdateConsoleCompany(ConsoleCompany entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a console company from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveConsoleCompany(long id)
|
public bool RemoveConsoleCompany(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all CPUs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All CPUs</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetCpus(out List<Cpu> entries)
|
public bool GetCpus(out List<Cpu> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of CPUs since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of CPUs</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetCpus(out List<Cpu> entries, ulong start, ulong count)
|
public bool GetCpus(out List<Cpu> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets CPU by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>CPU with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Cpu GetCpu(int id)
|
public Cpu GetCpu(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of CPUs in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountCpus()
|
public long CountCpus()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new CPU to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddCpu(Cpu entry, out long id)
|
public bool AddCpu(Cpu entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a CPU in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateCpu(Cpu entry)
|
public bool UpdateCpu(Cpu entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a CPU from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveCpu(long id)
|
public bool RemoveCpu(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all disk formats
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All disk formats</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetDiskFormats(out List<DiskFormat> entries)
|
public bool GetDiskFormats(out List<DiskFormat> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of disk formats since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of disk formats</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetDiskFormats(out List<DiskFormat> entries, ulong start, ulong count)
|
public bool GetDiskFormats(out List<DiskFormat> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets disk format by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Disk format with specified id, <c>null</c> if not found or error</returns>
|
||||||
public DiskFormat GetDiskFormat(int id)
|
public DiskFormat GetDiskFormat(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of disk formats in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountDiskFormats()
|
public long CountDiskFormats()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new disk format to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddDiskFormat(DiskFormat entry, out long id)
|
public bool AddDiskFormat(DiskFormat entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a disk format in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateDiskFormat(DiskFormat entry)
|
public bool UpdateDiskFormat(DiskFormat entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a disk format from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveDiskFormat(long id)
|
public bool RemoveDiskFormat(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all DSPs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All DSPs</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetDsps(out List<Dsp> entries)
|
public bool GetDsps(out List<Dsp> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of DSPs since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of DSPs</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetDsps(out List<Dsp> entries, ulong start, ulong count)
|
public bool GetDsps(out List<Dsp> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets DSP by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>DSP with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Dsp GetDsp(int id)
|
public Dsp GetDsp(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of DSPs in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountDsps()
|
public long CountDsps()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new DSP to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddDsp(Dsp entry, out long id)
|
public bool AddDsp(Dsp entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a DSP in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateDsp(Dsp entry)
|
public bool UpdateDsp(Dsp entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a DSP from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveDsp(long id)
|
public bool RemoveDsp(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all forbidden accesses
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All forbidden accesses</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetForbiddens(out List<Forbidden> entries)
|
public bool GetForbiddens(out List<Forbidden> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of forbidden accesses since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of forbidden accesses</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetForbiddens(out List<Forbidden> entries, ulong start, ulong count)
|
public bool GetForbiddens(out List<Forbidden> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets forbidden entry by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Forbidden entry with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Forbidden GetForbidden(int id)
|
public Forbidden GetForbidden(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of Forbidden accesses in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountForbiddens()
|
public long CountForbiddens()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new forbidden to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddForbidden(Forbidden entry, out long id)
|
public bool AddForbidden(Forbidden entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -168,6 +196,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a forbidden access in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateForbidden(Forbidden entry)
|
public bool UpdateForbidden(Forbidden entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -190,6 +223,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a forbidden access from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveForbidden(long id)
|
public bool RemoveForbidden(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all GPUs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All GPUs</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetGpus(out List<Gpu> entries)
|
public bool GetGpus(out List<Gpu> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of GPUs since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of GPUs</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetGpus(out List<Gpu> entries, ulong start, ulong count)
|
public bool GetGpus(out List<Gpu> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets GPU by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>GPU with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Gpu GetGpu(int id)
|
public Gpu GetGpu(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of GPUs in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountGpus()
|
public long CountGpus()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new GPU to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddGpu(Gpu entry, out long id)
|
public bool AddGpu(Gpu entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a GPU in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateGpu(Gpu entry)
|
public bool UpdateGpu(Gpu entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a GPU from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveGpu(long id)
|
public bool RemoveGpu(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using Cicm.Database.Schemas.Sql;
|
using Cicm.Database.Schemas.Sql;
|
||||||
@@ -35,6 +36,10 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes tables in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> if initialized correctly, <c>false</c> otherwise</returns>
|
||||||
public bool InitializeNewDatabase()
|
public bool InitializeNewDatabase()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Creating new database version {0}", DB_VERSION);
|
Console.WriteLine("Creating new database version {0}", DB_VERSION);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all log entries
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All log entries</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetLogs(out List<Log> entries)
|
public bool GetLogs(out List<Log> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of log entries since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of log entries</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetLogs(out List<Log> entries, ulong start, ulong count)
|
public bool GetLogs(out List<Log> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets log entry by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Log entry with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Log GetLog(int id)
|
public Log GetLog(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of log entries in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountLogs()
|
public long CountLogs()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new access log entry to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddLog(Log entry, out long id)
|
public bool AddLog(Log entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -168,6 +196,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an access log in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateLog(Log entry)
|
public bool UpdateLog(Log entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -190,6 +223,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes an access log entry from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveLog(long id)
|
public bool RemoveLog(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all money donations
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All money donations</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetMoneyDonations(out List<MoneyDonation> entries)
|
public bool GetMoneyDonations(out List<MoneyDonation> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of money donations since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of money donations</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetMoneyDonations(out List<MoneyDonation> entries, ulong start, ulong count)
|
public bool GetMoneyDonations(out List<MoneyDonation> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets money donation by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Money donation with specified id, <c>null</c> if not found or error</returns>
|
||||||
public MoneyDonation GetMoneyDonation(int id)
|
public MoneyDonation GetMoneyDonation(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of money donations in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountMoneyDonations()
|
public long CountMoneyDonations()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new money donation to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddMoneyDonation(MoneyDonation entry, out long id)
|
public bool AddMoneyDonation(MoneyDonation entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a money donation in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateMoneyDonation(MoneyDonation entry)
|
public bool UpdateMoneyDonation(MoneyDonation entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -189,6 +222,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a money donation from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveMoneyDonation(long id)
|
public bool RemoveMoneyDonation(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all MPUs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All MPUs</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetMpus(out List<Mpu> entries)
|
public bool GetMpus(out List<Mpu> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of MPUs since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of MPUs</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetMpus(out List<Mpu> entries, ulong start, ulong count)
|
public bool GetMpus(out List<Mpu> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets MPU by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>MPU with specified id, <c>null</c> if not found or error</returns>
|
||||||
public Mpu GetMpu(int id)
|
public Mpu GetMpu(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of MPUs in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountMpus()
|
public long CountMpus()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new MPU to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddMpu(Mpu entry, out long id)
|
public bool AddMpu(Mpu entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an MPU in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateMpu(Mpu entry)
|
public bool UpdateMpu(Mpu entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all site news
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All site news</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetNews(out List<News> entries)
|
public bool GetNews(out List<News> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of site news since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of site news</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetNews(out List<News> entries, ulong start, ulong count)
|
public bool GetNews(out List<News> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets site news by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Site news with specified id, <c>null</c> if not found or error</returns>
|
||||||
public News GetNews(int id)
|
public News GetNews(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of site news in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountNews()
|
public long CountNews()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new site news to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddNews(News entry, out long id)
|
public bool AddNews(News entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -167,6 +195,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated a site news in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateNews(News entry)
|
public bool UpdateNews(News entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -188,6 +221,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a site news entry from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveNews(long id)
|
public bool RemoveNews(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,12 +27,14 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
||||||
namespace Cicm.Database
|
namespace Cicm.Database
|
||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>Last known database version</summary>
|
||||||
const int DB_VERSION = 2;
|
const int DB_VERSION = 2;
|
||||||
|
|
||||||
readonly IDbConnection dbCon;
|
readonly IDbConnection dbCon;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all owned computers
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All owned computers</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetOwnOwnComputers(out List<OwnComputer> entries)
|
public bool GetOwnOwnComputers(out List<OwnComputer> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of owned computers since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of owned computers</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetOwnOwnComputers(out List<OwnComputer> entries, ulong start, ulong count)
|
public bool GetOwnOwnComputers(out List<OwnComputer> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets owned computer by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Owned computer with specified id, <c>null</c> if not found or error</returns>
|
||||||
public OwnComputer GetOwnComputer(int id)
|
public OwnComputer GetOwnComputer(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of owned computers in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountOwnOwnComputers()
|
public long CountOwnOwnComputers()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new owned computer to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddOwnComputer(OwnComputer entry, out long id)
|
public bool AddOwnComputer(OwnComputer entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -169,6 +197,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an owned computer in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateOwnComputer(OwnComputer entry)
|
public bool UpdateOwnComputer(OwnComputer entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -193,6 +226,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes an owned computer from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveOwnComputer(long id)
|
public bool RemoveOwnComputer(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -37,6 +38,11 @@ namespace Cicm.Database
|
|||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all owned consoles
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">All owned consoles</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetOwnOwnConsoles(out List<OwnConsole> entries)
|
public bool GetOwnOwnConsoles(out List<OwnConsole> entries)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -67,6 +73,13 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the specified number of owned consoles since the specified start
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entries">List of owned consoles</param>
|
||||||
|
/// <param name="start">Start of query</param>
|
||||||
|
/// <param name="count">How many entries to retrieve</param>
|
||||||
|
/// <returns><c>true</c> if <see cref="entries" /> is correct, <c>false</c> otherwise</returns>
|
||||||
public bool GetOwnOwnConsoles(out List<OwnConsole> entries, ulong start, ulong count)
|
public bool GetOwnOwnConsoles(out List<OwnConsole> entries, ulong start, ulong count)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -97,6 +110,11 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets owned console by specified id
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Id</param>
|
||||||
|
/// <returns>Owned console with specified id, <c>null</c> if not found or error</returns>
|
||||||
public OwnConsole GetOwnConsole(int id)
|
public OwnConsole GetOwnConsole(int id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -126,6 +144,10 @@ namespace Cicm.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Counts the number of owned consoles in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Entries in database</returns>
|
||||||
public long CountOwnOwnConsoles()
|
public long CountOwnOwnConsoles()
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -140,6 +162,12 @@ namespace Cicm.Database
|
|||||||
catch { return 0; }
|
catch { return 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new owned console to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Entry to add</param>
|
||||||
|
/// <param name="id">ID of added entry</param>
|
||||||
|
/// <returns><c>true</c> if added correctly, <c>false</c> otherwise</returns>
|
||||||
public bool AddOwnConsole(OwnConsole entry, out long id)
|
public bool AddOwnConsole(OwnConsole entry, out long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -168,6 +196,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updated an owned console in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entry">Updated entry</param>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateOwnConsole(OwnConsole entry)
|
public bool UpdateOwnConsole(OwnConsole entry)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -191,6 +224,11 @@ namespace Cicm.Database
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes an owned console from the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">ID of entry to remove</param>
|
||||||
|
/// <returns><c>true</c> if removed correctly, <c>false</c> otherwise</returns>
|
||||||
public bool RemoveOwnConsole(long id)
|
public bool RemoveOwnConsole(long id)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -27,10 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database
|
namespace Cicm.Database
|
||||||
{
|
{
|
||||||
public partial class Operations
|
public partial class Operations
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Updates opened database to last known version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> if updated correctly, <c>false</c> otherwise</returns>
|
||||||
public bool UpdateDatabase()
|
public bool UpdateDatabase()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|||||||
@@ -27,12 +27,17 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Site administrator</summary>
|
||||||
public class Admin
|
public class Admin
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Hashed password</summary>
|
||||||
public string password;
|
public string password;
|
||||||
|
/// <summary>Username</summary>
|
||||||
public string user;
|
public string user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,26 +27,45 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Browser test</summary>
|
||||||
public class BrowserTest
|
public class BrowserTest
|
||||||
{
|
{
|
||||||
public ushort id;
|
/// <summary>Supports animated GIF</summary>
|
||||||
public string idstring;
|
|
||||||
public string browser;
|
|
||||||
public string version;
|
|
||||||
public string os;
|
|
||||||
public string platform;
|
|
||||||
public bool gif87;
|
|
||||||
public bool gif89;
|
|
||||||
public bool jpeg;
|
|
||||||
public bool png;
|
|
||||||
public bool pngt;
|
|
||||||
public bool agif;
|
public bool agif;
|
||||||
public bool table;
|
/// <summary>Browser name</summary>
|
||||||
|
public string browser;
|
||||||
|
/// <summary>Supports colors</summary>
|
||||||
public bool colors;
|
public bool colors;
|
||||||
public bool js;
|
/// <summary>Supports Adobe Flash</summary>
|
||||||
public bool frames;
|
|
||||||
public bool flash;
|
public bool flash;
|
||||||
|
/// <summary>Supports IFRAMEs</summary>
|
||||||
|
public bool frames;
|
||||||
|
/// <summary>Supports GIF87</summary>
|
||||||
|
public bool gif87;
|
||||||
|
/// <summary>Supports GIF with transparency (GIF89)</summary>
|
||||||
|
public bool gif89;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public ushort id;
|
||||||
|
/// <summary>User agent string</summary>
|
||||||
|
public string idstring;
|
||||||
|
/// <summary>Supports JPEG</summary>
|
||||||
|
public bool jpeg;
|
||||||
|
/// <summary>Supports JavaScript</summary>
|
||||||
|
public bool js;
|
||||||
|
/// <summary>Browser operating system</summary>
|
||||||
|
public string os;
|
||||||
|
/// <summary>Browser architecture</summary>
|
||||||
|
public string platform;
|
||||||
|
/// <summary>Supports PNG</summary>
|
||||||
|
public bool png;
|
||||||
|
/// <summary>Supports PNG with alpha channel</summary>
|
||||||
|
public bool pngt;
|
||||||
|
/// <summary>Supports HTML tables</summary>
|
||||||
|
public bool table;
|
||||||
|
/// <summary>Browser version</summary>
|
||||||
|
public string version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Company</summary>
|
||||||
public class Company
|
public class Company
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Name</summary>
|
||||||
public string Compania;
|
public string Compania;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,36 +27,65 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Computer</summary>
|
||||||
public class Computer
|
public class Computer
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Bits of GPRs of primary CPU</summary>
|
||||||
public int company;
|
|
||||||
public int year;
|
|
||||||
public string model;
|
|
||||||
public int cpu1;
|
|
||||||
public float mhz1;
|
|
||||||
public int cpu2;
|
|
||||||
public float mhz2;
|
|
||||||
public int bits;
|
public int bits;
|
||||||
public int ram;
|
/// <summary>Capacity of first removable disk format</summary>
|
||||||
public int rom;
|
|
||||||
public int gpu;
|
|
||||||
public int vram;
|
|
||||||
public int colors;
|
|
||||||
public string res;
|
|
||||||
public int spu;
|
|
||||||
public int mpu;
|
|
||||||
public int sound_channels;
|
|
||||||
public int music_channels;
|
|
||||||
public int hdd1;
|
|
||||||
public int hdd2;
|
|
||||||
public int hdd3;
|
|
||||||
public int disk1;
|
|
||||||
public string cap1;
|
public string cap1;
|
||||||
public int disk2;
|
/// <summary>Capacity of second removable disk format</summary>
|
||||||
public string cap2;
|
public string cap2;
|
||||||
|
/// <summary>Maximum colors on screen</summary>
|
||||||
|
public int colors;
|
||||||
|
/// <summary>Free-form comments</summary>
|
||||||
public string comment;
|
public string comment;
|
||||||
|
/// <summary>Manufacturer's company ID</summary>
|
||||||
|
public int company;
|
||||||
|
/// <summary>Primary CPU</summary>
|
||||||
|
public int cpu1;
|
||||||
|
/// <summary>Secondary CPU</summary>
|
||||||
|
public int cpu2;
|
||||||
|
/// <summary>ID of first removable disk format</summary>
|
||||||
|
public int disk1;
|
||||||
|
/// <summary>ID of second removable disk format</summary>
|
||||||
|
public int disk2;
|
||||||
|
/// <summary>ID of GPU</summary>
|
||||||
|
public int gpu;
|
||||||
|
/// <summary>ID of first hard disk format</summary>
|
||||||
|
public int hdd1;
|
||||||
|
/// <summary>ID of second hard disk format</summary>
|
||||||
|
public int hdd2;
|
||||||
|
/// <summary>ID of third hard disk format</summary>
|
||||||
|
public int hdd3;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Frequency in MHz of primary CPU</summary>
|
||||||
|
public float mhz1;
|
||||||
|
/// <summary>Frequency in MHz of secondary CPU</summary>
|
||||||
|
public float mhz2;
|
||||||
|
/// <summary>Model name</summary>
|
||||||
|
public string model;
|
||||||
|
/// <summary>ID of MPU</summary>
|
||||||
|
public int mpu;
|
||||||
|
/// <summary>Audio channels supported by the MPU</summary>
|
||||||
|
public int music_channels;
|
||||||
|
/// <summary>Size in kibibytes of program RAM</summary>
|
||||||
|
public int ram;
|
||||||
|
/// <summary>Resolution in WxH pixels</summary>
|
||||||
|
public string res;
|
||||||
|
/// <summary>Size in kibibytes of firmware</summary>
|
||||||
|
public int rom;
|
||||||
|
/// <summary>Audio channels supported by the DSP</summary>
|
||||||
|
public int sound_channels;
|
||||||
|
/// <summary>ID of DSP</summary>
|
||||||
|
public int spu;
|
||||||
|
/// <summary>Size in kibibytes for video RAM</summary>
|
||||||
|
public int vram;
|
||||||
|
/// <summary>Introduction date, 0 if unknown</summary>
|
||||||
|
public int year;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,32 +27,56 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
public class Console
|
public class Console
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Bits of GPRs of primary CPU</summary>
|
||||||
public int company;
|
|
||||||
public string name;
|
|
||||||
public int year;
|
|
||||||
public int cpu1;
|
|
||||||
public float mhz1;
|
|
||||||
public int cpu2;
|
|
||||||
public float mhz2;
|
|
||||||
public int bits;
|
public int bits;
|
||||||
public int ram;
|
/// <summary>Capacity in kibibytes of storage format</summary>
|
||||||
public int rom;
|
|
||||||
public int gpu;
|
|
||||||
public int vram;
|
|
||||||
public string res;
|
|
||||||
public int colors;
|
|
||||||
public int palette;
|
|
||||||
public int spu;
|
|
||||||
public int schannels;
|
|
||||||
public int mpu;
|
|
||||||
public int mchannels;
|
|
||||||
public int format;
|
|
||||||
public int cap;
|
public int cap;
|
||||||
|
/// <summary>Maximum colors on screen</summary>
|
||||||
|
public int colors;
|
||||||
|
/// <summary>Free-form comments</summary>
|
||||||
public string comments;
|
public string comments;
|
||||||
|
/// <summary>Manufacturer's company ID</summary>
|
||||||
|
public int company;
|
||||||
|
/// <summary>Primary CPU</summary>
|
||||||
|
public int cpu1;
|
||||||
|
/// <summary>Secondary CPU</summary>
|
||||||
|
public int cpu2;
|
||||||
|
/// <summary>ID of storage format</summary>
|
||||||
|
public int format;
|
||||||
|
/// <summary>ID of GPU</summary>
|
||||||
|
public int gpu;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Audio channels supported by the MPU</summary>
|
||||||
|
public int mchannels;
|
||||||
|
/// <summary>Frequency in MHz of primary CPU</summary>
|
||||||
|
public float mhz1;
|
||||||
|
/// <summary>Frequency in MHz of secondary CPU</summary>
|
||||||
|
public float mhz2;
|
||||||
|
/// <summary>ID of MPU</summary>
|
||||||
|
public int mpu;
|
||||||
|
/// <summary>Model name</summary>
|
||||||
|
public string name;
|
||||||
|
/// <summary>Colors on palette</summary>
|
||||||
|
public int palette;
|
||||||
|
/// <summary>Size in kibibytes of program RAM</summary>
|
||||||
|
public int ram;
|
||||||
|
/// <summary>Resolution in WxH pixels</summary>
|
||||||
|
public string res;
|
||||||
|
/// <summary>Size in kibibytes of firmware</summary>
|
||||||
|
public int rom;
|
||||||
|
/// <summary>Audio channels supported by the DSP</summary>
|
||||||
|
public int schannels;
|
||||||
|
/// <summary>ID of DSP</summary>
|
||||||
|
public int spu;
|
||||||
|
/// <summary>Size in kibibytes for video RAM</summary>
|
||||||
|
public int vram;
|
||||||
|
/// <summary>Introduction date, 0 if unknown</summary>
|
||||||
|
public int year;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,17 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Videogame console manufacturing company
|
||||||
|
/// </summary>
|
||||||
public class ConsoleCompany
|
public class ConsoleCompany
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Name</summary>
|
||||||
public string company;
|
public string company;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Central Processing Unit</summary>
|
||||||
public class Cpu
|
public class Cpu
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Name</summary>
|
||||||
public string cpu;
|
public string cpu;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Storage format</summary>
|
||||||
public class DiskFormat
|
public class DiskFormat
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Description</summary>
|
||||||
public string Format;
|
public string Format;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
// --[ Description ] ----------------------------------------------------------
|
// --[ Description ] ----------------------------------------------------------
|
||||||
//
|
//
|
||||||
// High level representation of a DSP (Digital Signal Processor).
|
// High level representation of a DSP (Digital Sound Processor).
|
||||||
//
|
//
|
||||||
// --[ License ] --------------------------------------------------------------
|
// --[ License ] --------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Digital Sound Processor</summary>
|
||||||
public class Dsp
|
public class Dsp
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Name</summary>
|
||||||
public string DSP;
|
public string DSP;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,14 +27,21 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Accesses forbidden with HTTP STATUS 403</summary>
|
||||||
public class Forbidden
|
public class Forbidden
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>User agent</summary>
|
||||||
public string browser;
|
public string browser;
|
||||||
|
/// <summary>Date of access</summary>
|
||||||
public string date;
|
public string date;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Access IP</summary>
|
||||||
public string ip;
|
public string ip;
|
||||||
|
/// <summary>Referer</summary>
|
||||||
public string referer;
|
public string referer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Graphics Processing Unit</summary>
|
||||||
public class Gpu
|
public class Gpu
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Name</summary>
|
||||||
public string gpu;
|
public string gpu;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,14 +27,23 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Access log
|
||||||
|
/// </summary>
|
||||||
public class Log
|
public class Log
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>User agent string</summary>
|
||||||
public string browser;
|
public string browser;
|
||||||
public string ip;
|
/// <summary>Access date</summary>
|
||||||
public string date;
|
public string date;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Access IP</summary>
|
||||||
|
public string ip;
|
||||||
|
/// <summary>Referer</summary>
|
||||||
public string referer;
|
public string referer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,12 +27,17 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Money donations</summary>
|
||||||
public class MoneyDonation
|
public class MoneyDonation
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Donator</summary>
|
||||||
public string donator;
|
public string donator;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Donation quantity in euros</summary>
|
||||||
public float quantity;
|
public float quantity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,15 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Music Processing Unit</summary>
|
||||||
public class Mpu
|
public class Mpu
|
||||||
{
|
{
|
||||||
|
/// <summary>ID</summary>
|
||||||
public int id;
|
public int id;
|
||||||
|
/// <summary>Name</summary>
|
||||||
public string mpu;
|
public string mpu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,13 +27,19 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Site news</summary>
|
||||||
public class News
|
public class News
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Affected ID</summary>
|
||||||
public string date;
|
|
||||||
public int type;
|
|
||||||
public int added_id;
|
public int added_id;
|
||||||
|
/// <summary>Date</summary>
|
||||||
|
public string date;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>News type</summary>
|
||||||
|
public int type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,27 +27,47 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Owned computer</summary>
|
||||||
public class OwnComputer
|
public class OwnComputer
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Box present in collection</summary>
|
||||||
public int db_id;
|
|
||||||
public string date;
|
|
||||||
public int status;
|
|
||||||
public bool trade;
|
|
||||||
public bool boxed;
|
public bool boxed;
|
||||||
public bool manuals;
|
/// <summary>Capacity of first removable disk format</summary>
|
||||||
public int cpu1;
|
|
||||||
public float mhz1;
|
|
||||||
public int cpu2;
|
|
||||||
public float mhz2;
|
|
||||||
public int ram;
|
|
||||||
public int vram;
|
|
||||||
public string rigid;
|
|
||||||
public int disk1;
|
|
||||||
public int cap1;
|
public int cap1;
|
||||||
public int disk2;
|
/// <summary>Capacity of second removable disk format</summary>
|
||||||
public int cap2;
|
public int cap2;
|
||||||
|
/// <summary>Primary CPU</summary>
|
||||||
|
public int cpu1;
|
||||||
|
/// <summary>Secondary CPU</summary>
|
||||||
|
public int cpu2;
|
||||||
|
/// <summary>Adquired date</summary>
|
||||||
|
public string date;
|
||||||
|
/// <summary>Computer's ID</summary>
|
||||||
|
public int db_id;
|
||||||
|
/// <summary>ID of first removable disk format</summary>
|
||||||
|
public int disk1;
|
||||||
|
/// <summary>ID of second removable disk format</summary>
|
||||||
|
public int disk2;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Original manuals present in collection</summary>
|
||||||
|
public bool manuals;
|
||||||
|
/// <summary>Frequency in MHz of primary CPU</summary>
|
||||||
|
public float mhz1;
|
||||||
|
/// <summary>Frequency in MHz of secondary CPU</summary>
|
||||||
|
public float mhz2;
|
||||||
|
/// <summary>Size in kibibytes of program RAM</summary>
|
||||||
|
public int ram;
|
||||||
|
/// <summary>Rigid disk</summary>
|
||||||
|
public string rigid;
|
||||||
|
/// <summary>Status</summary>
|
||||||
|
public int status;
|
||||||
|
/// <summary>Available for trade</summary>
|
||||||
|
public bool trade;
|
||||||
|
/// <summary>Size in kibibytes for video RAM</summary>
|
||||||
|
public int vram;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,16 +27,25 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas
|
namespace Cicm.Database.Schemas
|
||||||
{
|
{
|
||||||
|
/// <summary>Owned videogame console</summary>
|
||||||
public class OwnConsole
|
public class OwnConsole
|
||||||
{
|
{
|
||||||
public int id;
|
/// <summary>Box present in collection</summary>
|
||||||
public int db_id;
|
|
||||||
public string date;
|
|
||||||
public int status;
|
|
||||||
public bool trade;
|
|
||||||
public bool boxed;
|
public bool boxed;
|
||||||
|
/// <summary>Adquired date</summary>
|
||||||
|
public string date;
|
||||||
|
/// <summary>Videogame console's ID</summary>
|
||||||
|
public int db_id;
|
||||||
|
/// <summary>ID</summary>
|
||||||
|
public int id;
|
||||||
|
/// <summary>Original manuals present in collection</summary>
|
||||||
public bool manuals;
|
public bool manuals;
|
||||||
|
/// <summary>Status</summary>
|
||||||
|
public int status;
|
||||||
|
/// <summary>Available for trade</summary>
|
||||||
|
public bool trade;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
namespace Cicm.Database.Schemas.Sql
|
namespace Cicm.Database.Schemas.Sql
|
||||||
{
|
{
|
||||||
public static class V2
|
public static class V2
|
||||||
|
|||||||
Reference in New Issue
Block a user