Renamed namespaces and related identifiers from EnvelopeGenerator.WebUI to EnvelopeGenerator.Server across the project. This change affects data models, services, controllers, and configuration files to ensure consistency with the new architecture. Updated @using directives in Razor components and other files to reflect the new namespace structure. Adjusted project references in EnvelopeGenerator.Server.csproj to point to the new EnvelopeGenerator.Server.Client project. Modified middleware and logging configurations to use the new EnvelopeGenerator.Server namespace, including changes in Program.cs and appsettings.json. Updated resource and file references to use the new EnvelopeGenerator.Server path, ensuring correct resource loading. Adjusted configuration options in Program.cs to use the new namespace for options classes, such as ApiOptions and PdfViewerOptions. Updated authentication scheme names and related constants to align with the new namespace structure. Revised comments and documentation to reflect the new namespace, ensuring clarity and consistency in the codebase.
45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
namespace EnvelopeGenerator.Server.Client.Data {
|
|
public class Adjustment
|
|
{
|
|
public static Adjustment CreateBalanceForward(DateTime dt, int random)
|
|
{
|
|
var rnd = new DeterministicRandom(random);
|
|
Adjustment res = new Adjustment();
|
|
res.currentDateTime = dt;
|
|
res.currentDescription = "Balance Forward";
|
|
res.currentAmount = rnd.Random(10, 300) * 10;
|
|
return res;
|
|
}
|
|
public static Adjustment CreatePayment(DateTime dt, int random)
|
|
{
|
|
var rnd = new DeterministicRandom(random);
|
|
Adjustment res = new Adjustment();
|
|
res.currentDateTime = dt;
|
|
res.currentDescription = "Payment";
|
|
res.currentAmount = -rnd.Random(1, 40) * 10;
|
|
return res;
|
|
}
|
|
public static Adjustment CreateCharge(DateTime dt, int random)
|
|
{
|
|
var rnd = new DeterministicRandom(random);
|
|
Adjustment res = new Adjustment();
|
|
res.currentDateTime = dt;
|
|
res.currentDescription = rnd.GetRandomItem(bills);
|
|
res.currentAmount = rnd.Random(10, 50) * 10;
|
|
return res;
|
|
}
|
|
|
|
DateTime currentDateTime;
|
|
string currentDescription = "";
|
|
double currentAmount = 0;
|
|
static readonly string[] bills = new string[] { "Bill - Insurance", "Bill - Electricity", "Bill - Rent", "Bill - Phone", "Bill - Office Supplies" };
|
|
public DateTime Date { get { return currentDateTime; } }
|
|
public string Description { get { return currentDescription; } }
|
|
public double Amount { get { return currentAmount; } }
|
|
|
|
public Adjustment()
|
|
{
|
|
}
|
|
}
|
|
}
|