This finishes the first iteration of the project. Reports have been tested and are functional in terms of writing out and outputting some form of text. There are still a few bugs here and there that are found but ultimately this commit is so testing can begin. Since the changes are too large to individually summarize, here is the generalization: Reports have been integrated into the admin mode. They write out to text files rather than export to say email or a printer as it was not to be considered for this version. The files are appended too and exist in the debug director of the project. I made this easier to find by outputting where the files were output to after running the report. Other changes included some bug fixes, optimizations, and a few bit of automatic cleanup. This may lead to sylistic inconsistencies. Documentation will come in a later commit.
25 lines
840 B
C#
25 lines
840 B
C#
namespace Ophelias.Reporting
|
|
{
|
|
internal class Email
|
|
{
|
|
private readonly string to;
|
|
private readonly string subject = "Your payment is due soon!";
|
|
private readonly string body = "Hello valued customer, this is a reminder that your payment for your reservation is due soon, please login to the system and pay for your reservation. If you do not it will be canceled.";
|
|
private readonly string from = "no-reply@ophelias.oasis";
|
|
|
|
internal Email(string to)
|
|
{
|
|
this.to = to;
|
|
}
|
|
internal void Send()
|
|
{
|
|
File.AppendAllText(Path.GetFullPath("Emails.txt"),
|
|
$"TO: {to}\n" +
|
|
$"FROM: {from}\n" +
|
|
$"SUBJECT: {subject}\n" +
|
|
$"MESSAGE: {body}\n" +
|
|
$"\n");
|
|
}
|
|
}
|
|
}
|