The HotelManager class now has been connected to some aspects of the
command line interface and is functioning for a few cases such as
logging in as a specific guest via email, chaging a guests information
and creating a new guest account. This was implemented first over the
reservation system to test and implement something on a smaller scale.
Furthermore, the reservation depends on an existing guest account since
a Guest ID needs to be linked to the reservation that is created.
Other changes include redesigning, tweaking/ adjusting, and/ or fixing
of other modules that have not yet been implemented or are partially
implemented.
This is another commit to mostly version the code. There have been a
considerable number of changes and there is functionality that I am
still determining whether it should lie within the manager or the model
class itself. It makes the most sense to possibly add the "Update" or
database manipulation functions on the models themselves. On the other
hand, instead of creating and generating the ID in the model, the
current design is to create the entry in the database first, get the
last insert row ID and create a new and complete model that is returned
back by the function. This allows us to leverage the autoincrement
functionality of the database rather than trying to design a function
and/ or make an additional call to the database.
**NOTE: Code is non-functional due to some classes not having their
errors resolved.
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.
This commit includes the following models:
- Guest
- Reservation
- Room
- Transaction
The guest model is used to represent a guest which will create a unique
guest entry represented through its ID. The model also collects
represents and reflects a guests first and last name and their personal
information including email and credit card, phone number still needs to
be included.
The reservation model focuses on #9. See the issue for more specific
details. The changes made to better define this model include changing
the original Cancellation variable to a more meaningful one called
Status. The Status variable can either be Active, Changed, or Cancelled
and enums are used as a better approach than creating and setting an int
value for an int variable. The same approach was used for the
reservation types. Furthermore, the original model was missing the
StartDate and EndDate, confusing them for the CheckIn and CheckOut date,
which can, but is not guaranteed to be identical. NoShow was moved from
the transaction model to the reservation model because it made more
sense.
The Transaction and Room models are currently empty and were created in
preperation of work. Transaction, formerly Payments, did have a model
built, however git stash did not properly store these changes.
Additional changes include the beginning of working on the main
Program.cs, however, this was mostly to ensure that the console was
outputting and the project was building.
Other (less important) notes...
A .gitignore has been added for C#, this is modified to include .vs
files since they are mostly cache files. If this breaks the project it
can always be dropped later.
The project file itself has been versioned, it may not play nice on
other machines, but ideally should be fine and nothing should go wrong
when running the project file.