Database Update
데이터 베이스 생성구문 업데이트
This commit is contained in:
@@ -27,15 +27,15 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
var createKeyTable = @"
|
var createKeyTable = @"
|
||||||
CREATE TABLE ""ApplicantList"" (
|
CREATE TABLE ""ApplicantList"" (
|
||||||
""ApplicantType"" INTEGER NOT NULL,
|
""ApplicantType"" INTEGER NOT NULL,
|
||||||
""RegistrationNumberTruck"" TEXT NOT NULL,
|
""RegistrationNumberTruck"" TEXT NOT NULL,
|
||||||
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
||||||
""Name"" TEXT NOT NULL,
|
""Name"" TEXT NOT NULL,
|
||||||
""Phone"" TEXT NOT NULL,
|
""Phone"" TEXT NOT NULL,
|
||||||
""Address"" TEXT NOT NULL,
|
""Address"" TEXT NOT NULL,
|
||||||
""DateOfApplicant"" TEXT NOT NULL,
|
""DateOfApplicant"" TEXT NOT NULL,
|
||||||
""Inspection"" INTEGER NOT NULL
|
""Inspection"" INTEGER NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE ""Certificate"" (
|
CREATE TABLE ""Certificate"" (
|
||||||
""No"" INTEGER NOT NULL UNIQUE,
|
""No"" INTEGER NOT NULL UNIQUE,
|
||||||
@@ -43,27 +43,40 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
""UserNo"" INTEGER NOT NULL,
|
""UserNo"" INTEGER NOT NULL,
|
||||||
PRIMARY KEY(""No"" AUTOINCREMENT)
|
PRIMARY KEY(""No"" AUTOINCREMENT)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE ""DeleteList"" (
|
CREATE TABLE ""DeleteList"" (
|
||||||
""ApplicantType"" INTEGER NOT NULL,
|
""ApplicantType"" INTEGER NOT NULL,
|
||||||
""RegistrationNumberTruck"" TEXT NOT NULL,
|
""RegistrationNumberTruck"" TEXT NOT NULL,
|
||||||
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
||||||
""Name"" TEXT NOT NULL,
|
""Name"" TEXT NOT NULL,
|
||||||
""Phone"" TEXT NOT NULL,
|
""Phone"" TEXT NOT NULL,
|
||||||
""Address"" TEXT NOT NULL,
|
""Address"" TEXT NOT NULL,
|
||||||
""DateOfApplicant"" TEXT NOT NULL,
|
""DateOfApplicant"" TEXT NOT NULL,
|
||||||
""Inspection"" INTEGER NOT NULL,
|
""Inspection"" INTEGER NOT NULL,
|
||||||
""DeleteDate"" TEXT NOT NULL,
|
""DeleteDate"" TEXT NOT NULL,
|
||||||
""DeleterName"" TEXT NOT NULL,
|
""DeleterName"" TEXT NOT NULL,
|
||||||
""DeleteReason"" TEXT NOT NULL
|
""DeleteReason"" TEXT NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE ""LedgerCertificate"" (
|
||||||
|
""No"" INTEGER NOT NULL,
|
||||||
|
""IssueNumber"" TEXT NOT NULL,
|
||||||
|
""Date"" TEXT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE ""LedgerProceeds"" (
|
||||||
|
""No"" INTEGER,
|
||||||
|
""Type"" INTEGER,
|
||||||
|
""Amount"" INTEGER,
|
||||||
|
""Date"" TEXT
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE ""RefundList"" (
|
CREATE TABLE ""RefundList"" (
|
||||||
""No"" INTEGER NOT NULL UNIQUE,
|
""No"" INTEGER NOT NULL UNIQUE,
|
||||||
""UserNo"" INTEGER NOT NULL,
|
""UserNo"" INTEGER NOT NULL,
|
||||||
""RefundDate"" TEXT NOT NULL,
|
""RefundDate"" TEXT NOT NULL,
|
||||||
""RefundAmount"" INTEGER NOT NULL,
|
""RefundAmount"" INTEGER NOT NULL
|
||||||
PRIMARY KEY(""No"" AUTOINCREMENT)
|
);
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE ""Settings"" (
|
CREATE TABLE ""Settings"" (
|
||||||
""SettingName"" TEXT NOT NULL,
|
""SettingName"" TEXT NOT NULL,
|
||||||
@@ -72,19 +85,19 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE ""UserList"" (
|
CREATE TABLE ""UserList"" (
|
||||||
""No"" INTEGER NOT NULL UNIQUE,
|
""No"" INTEGER NOT NULL UNIQUE,
|
||||||
""RegistrationNumberTruck"" TEXT NOT NULL,
|
""RegistrationNumberTruck"" TEXT NOT NULL,
|
||||||
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
""RegistrationNumberPassenger"" TEXT NOT NULL,
|
||||||
""Name"" TEXT NOT NULL,
|
""Name"" TEXT NOT NULL,
|
||||||
""Phone"" TEXT NOT NULL,
|
""Phone"" TEXT NOT NULL,
|
||||||
""Address"" TEXT NOT NULL,
|
""Address"" TEXT NOT NULL,
|
||||||
""DateOfApplicant"" TEXT NOT NULL,
|
""DateOfApplicant"" TEXT NOT NULL,
|
||||||
""DateStart"" TEXT NOT NULL,
|
""DateStart"" TEXT NOT NULL,
|
||||||
""DateEnd"" TEXT NOT NULL,
|
""DateEnd"" TEXT NOT NULL,
|
||||||
""Extended"" INTEGER NOT NULL,
|
""Extended"" INTEGER NOT NULL,
|
||||||
""RefundCheck"" INTEGER NOT NULL,
|
""RefundCheck"" INTEGER NOT NULL,
|
||||||
PRIMARY KEY(""No"" AUTOINCREMENT)
|
PRIMARY KEY(""No"" AUTOINCREMENT)
|
||||||
);";
|
);";
|
||||||
|
|
||||||
using (var command = _sqLiteConnection.CreateCommand())
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
{
|
{
|
||||||
@@ -389,9 +402,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
public static List<ProceedsData> GetLedgerProceeds(DateTime startDateTime, DateTime endDateTime)
|
public static List<ProceedsData> GetLedgerProceeds(DateTime startDateTime, DateTime endDateTime)
|
||||||
{
|
{
|
||||||
List<ProceedsData> proceedsDatas = new List<ProceedsData>();
|
var proceedsDatas = new List<ProceedsData>();
|
||||||
|
|
||||||
string query = $"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerProceeds.Type, LedgerProceeds.Amount, LedgerProceeds.Date From LedgerProceeds INNER JOIN UserList ON LedgerProceeds.No = UserList.No Where LedgerProceeds.Date >='{startDateTime}' And LedgerProceeds.Date <='{endDateTime}'";
|
var query =
|
||||||
|
$"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerProceeds.Type, LedgerProceeds.Amount, LedgerProceeds.Date From LedgerProceeds INNER JOIN UserList ON LedgerProceeds.No = UserList.No Where LedgerProceeds.Date >='{startDateTime}' And LedgerProceeds.Date <='{endDateTime}'";
|
||||||
|
|
||||||
using (var command = _sqLiteConnection.CreateCommand())
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
{
|
{
|
||||||
@@ -401,7 +415,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
ProceedsData proceedsData = new ProceedsData();
|
var proceedsData = new ProceedsData();
|
||||||
proceedsData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
proceedsData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
||||||
proceedsData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
proceedsData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
||||||
proceedsData.Name = reader["Name"].ToString();
|
proceedsData.Name = reader["Name"].ToString();
|
||||||
@@ -418,8 +432,9 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
public static List<CertificateData> GetLedgerCertificate(DateTime startDateTime, DateTime endDateTime)
|
public static List<CertificateData> GetLedgerCertificate(DateTime startDateTime, DateTime endDateTime)
|
||||||
{
|
{
|
||||||
List<CertificateData> certificateDatas = new List<CertificateData>();
|
var certificateDatas = new List<CertificateData>();
|
||||||
string query = $"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerCertificate.Date From LedgerCertificate INNER JOIN UserList ON LedgerCertificate.No = UserList.No Where LedgerCertificate.Date >='{startDateTime}' And LedgerCertificate.Date <='{endDateTime}'";
|
var query =
|
||||||
|
$"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerCertificate.Date From LedgerCertificate INNER JOIN UserList ON LedgerCertificate.No = UserList.No Where LedgerCertificate.Date >='{startDateTime}' And LedgerCertificate.Date <='{endDateTime}'";
|
||||||
|
|
||||||
using (var command = _sqLiteConnection.CreateCommand())
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
{
|
{
|
||||||
@@ -429,7 +444,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
CertificateData certificateData = new CertificateData();
|
var certificateData = new CertificateData();
|
||||||
certificateData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
certificateData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
||||||
certificateData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
certificateData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
||||||
certificateData.Name = reader["Name"].ToString();
|
certificateData.Name = reader["Name"].ToString();
|
||||||
@@ -489,7 +504,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
}
|
}
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
// 셋팅 네임/ 세팅 벨류 셋팅 데이트
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SaveSettings(Settings settings)
|
public static void SaveSettings(Settings settings)
|
||||||
|
Reference in New Issue
Block a user