From 6ffa856795916b8ed9c155506110e93747dddcef Mon Sep 17 00:00:00 2001 From: "DESKTOP-GENO133\\IvanPlex" Date: Mon, 15 Jan 2024 09:32:15 -0700 Subject: [PATCH] defaults input to today's date but only if there aren't any dates provided. --- Models/Collision/CollisionRecordInput.cs | 2 +- Models/GasRecord/GasRecordInput.cs | 2 +- Models/ServiceRecord/ServiceRecordInput.cs | 2 +- Models/TaxRecord/TaxRecordInput.cs | 2 +- Models/Upgrades/UpgradeReportInput.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Models/Collision/CollisionRecordInput.cs b/Models/Collision/CollisionRecordInput.cs index 21a54e4..a07cb17 100644 --- a/Models/Collision/CollisionRecordInput.cs +++ b/Models/Collision/CollisionRecordInput.cs @@ -4,7 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } - public string Date { get; set; } + public string Date { get; set; } = DateTime.Now.ToShortDateString(); public int Mileage { get; set; } public string Description { get; set; } public decimal Cost { get; set; } diff --git a/Models/GasRecord/GasRecordInput.cs b/Models/GasRecord/GasRecordInput.cs index 3a7ae19..2a5243c 100644 --- a/Models/GasRecord/GasRecordInput.cs +++ b/Models/GasRecord/GasRecordInput.cs @@ -4,7 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } - public string Date { get; set; } + public string Date { get; set; } = DateTime.Now.ToShortDateString(); /// /// American moment /// diff --git a/Models/ServiceRecord/ServiceRecordInput.cs b/Models/ServiceRecord/ServiceRecordInput.cs index 19d92c1..f904ab1 100644 --- a/Models/ServiceRecord/ServiceRecordInput.cs +++ b/Models/ServiceRecord/ServiceRecordInput.cs @@ -4,7 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } - public string Date { get; set; } + public string Date { get; set; } = DateTime.Now.ToShortDateString(); public int Mileage { get; set; } public string Description { get; set; } public decimal Cost { get; set; } diff --git a/Models/TaxRecord/TaxRecordInput.cs b/Models/TaxRecord/TaxRecordInput.cs index e600484..cbe33c5 100644 --- a/Models/TaxRecord/TaxRecordInput.cs +++ b/Models/TaxRecord/TaxRecordInput.cs @@ -4,7 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } - public string Date { get; set; } + public string Date { get; set; } = DateTime.Now.ToShortDateString(); public string Description { get; set; } public decimal Cost { get; set; } public string Notes { get; set; } diff --git a/Models/Upgrades/UpgradeReportInput.cs b/Models/Upgrades/UpgradeReportInput.cs index a59abc6..b3e11b3 100644 --- a/Models/Upgrades/UpgradeReportInput.cs +++ b/Models/Upgrades/UpgradeReportInput.cs @@ -4,7 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } - public string Date { get; set; } + public string Date { get; set; } = DateTime.Now.ToShortDateString(); public int Mileage { get; set; } public string Description { get; set; } public decimal Cost { get; set; }