mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-08-17 02:07:20 +02:00
![Marcel Grześ](/assets/img/avatar_default.png)
A few models has been improved; New pages has been added; NewRecordDialog has been added; ViewNavigator was created; A type providers has been added; new interfaces has been added; New validator, which checks if interface is implemented has been added; The application can read data and add new record by API now.
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using HospitalServerManager.InterfacesAndEnums;
|
|
using HospitalServerManager.Model.Controllers;
|
|
|
|
namespace HospitalServerManager.Model.Basic
|
|
{
|
|
internal abstract class SqlTable : ISqlTableModelable
|
|
{
|
|
// TODO: Dodac table do klas modelu
|
|
public string PrimaryKey { get; protected set; }
|
|
protected string PrimaryKeyName { get; set; }
|
|
protected List<string> ColumnNames { get; set; }
|
|
protected SqlTable()
|
|
{
|
|
PrimaryKey = "BRAK";
|
|
PrimaryKeyName = "BRAK";
|
|
ColumnNames = new List<string>();
|
|
}
|
|
public SqlTable(string primaryKey, string primaryKeyName, List<string> columnNames)
|
|
{
|
|
PrimaryKey = primaryKey;
|
|
PrimaryKeyName = primaryKeyName;
|
|
ColumnNames = columnNames;
|
|
}
|
|
|
|
public string GetPrimaryKey()
|
|
{
|
|
return PrimaryKey;
|
|
}
|
|
|
|
public string GetPrimaryKeyName()
|
|
{
|
|
return PrimaryKeyName;
|
|
}
|
|
|
|
public List<string> GetColumnNames()
|
|
{
|
|
return ColumnNames;
|
|
}
|
|
}
|
|
}
|