2024-05-30 04:06:00 +04:00
|
|
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
namespace PolyclinicContracts.BindingModels
|
2024-05-01 23:29:56 +04:00
|
|
|
|
{
|
2024-05-30 01:46:40 +04:00
|
|
|
|
public class ReportBindingModel
|
2024-05-01 23:29:56 +04:00
|
|
|
|
{
|
2024-05-29 23:05:17 +04:00
|
|
|
|
public string? FileName { get; set; }
|
2024-05-01 23:29:56 +04:00
|
|
|
|
public DateTime? DateFrom { get; set; }
|
|
|
|
|
public DateTime? DateTo { get; set; }
|
2024-05-30 04:06:00 +04:00
|
|
|
|
public string GetPeriodString()
|
|
|
|
|
{
|
|
|
|
|
string txt = "";
|
|
|
|
|
if (DateFrom == null && DateTo == null)
|
|
|
|
|
{
|
|
|
|
|
txt = "за все время";
|
|
|
|
|
}
|
|
|
|
|
else if (DateFrom == null)
|
|
|
|
|
{
|
|
|
|
|
txt = $"по {DateTo?.ToShortDateString()}";
|
|
|
|
|
}
|
|
|
|
|
else if (DateTo == null)
|
|
|
|
|
{
|
|
|
|
|
txt = $"с {DateFrom?.ToShortDateString()}";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
txt = $"с {DateFrom?.ToShortDateString()} по {DateTo?.ToShortDateString()}";
|
|
|
|
|
}
|
|
|
|
|
return txt;
|
|
|
|
|
}
|
2024-05-01 23:29:56 +04:00
|
|
|
|
}
|
|
|
|
|
}
|