Files
ophelias-oasis/OpheliasOasis/Program.cs
雲華 349589674f Manager classes added and model updates
This commit introduces a large number of changes. Namely there are a
number of additions to a new set of classes that manage the database
and/ or the models shared between the code and databse. There is
fragmented non-functional code in this commit and there may be debug/
old code that still needs to be removed. This commit is just to version
these changes as they were not commited previously. There is also some
console interface code written, but has next to no functionality
attached to any existing prompts. More details will be published per .cs
file, ie specific manager or model, once they are finished as they are
undergoing rapid and significant changes regularly.
2022-04-11 23:40:37 -04:00

92 lines
2.7 KiB
C#

using Ophelias.Models;
using Ophelias.Managers;
using System.Data.SQLite;
class Program
{
private static void GuestMode()
{
Reservation? activeReservation = null;
Guest? activeGuest = null;
TransactionTableManager tx = new TransactionTableManager(null);
tx.UpdateTransactionInfo(1);
void help()
{
Console.WriteLine(
"Reservation Commands:\n" +
"\treservation create\n" +
"\treservation update\n" +
"\treservation cancel\n" +
"Account Commands:" +
"\taccount create\n" +
"\taccount update\n" +
"Enter Q to quit.\n"
);
return;
}
void CreateNewReservation()
{
Reservation newReservation;
}
while(true)
{
Console.WriteLine(
"Welcome to the Ophelias Oasis Hotel Registration System!\n" +
"Type help to get a full list of commands or enter a command.\n" +
"Command: "
);
string? input = Console.ReadLine();
switch(input)
{
case "help": help(); break;
case "reservation create": break;
case "reservation update": break;
case "reservation cancel": break;
case "account update": break;
case "q": return;
default: Console.WriteLine("Unknown command, enter help for more inforamtion."); break;
}
}
}
private void AdminMode()
{
void help()
{
Console.WriteLine(
"Report Commands:\n" +
"\treservation create\n" +
"\treservation update\n" +
"\treservation cancel\n" +
"Account Commands:" +
"\taccount create\n" +
"\taccount update\n" +
"Enter Q to quit.\n"
);
return;
}
}
static void Main()
{
SQLiteConnection.CreateFile("OpheliasOasis.sqlite");
bool run = true;
while (run)
{
Console.WriteLine(
"Are you an employee or customer?\n" +
"1. Employee\n" +
"2. Customer/ Guest"
);
switch(Console.ReadLine().ToUpper())
{
case "1": break;
case "2": GuestMode(); break;
case "Q": run = false; break;
default: Console.WriteLine("You must either specify 1 for Employee, 2 for Customer/ Guest, or Q to quit.\n\n"); break;
}
}
}
}