Files
BeWoPlaner/Dakota/Models/Daten/DatenelementDateTime.cs

33 lines
777 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dakota.Models.Daten
{
internal class DatenelementDateTime : Datenelement
{
public DateTime? DateTime { get; set; }
public string Format { get; set; }
public DatenelementDateTime(string title, int count, string format, Feldart art) : base(title, count, count, art)
{
_IgnoreCheck = true;
Format = format;
}
public void SetValue(DateTime? input)
{
if(input.HasValue)
{
SetValue(input.Value.ToString(Format));
}
else
{
ClearValue();
}
}
}
}