29 lines
776 B
C#
29 lines
776 B
C#
using Dakota.Models.Schlüssels;
|
|
using System;
|
|
|
|
namespace Dakota.Models.Daten
|
|
{
|
|
internal class DatenelementDecimal : Datenelement
|
|
{
|
|
public DatenelementDecimal(string title, int min, int max, Feldart art) : base(title, min, max, art)
|
|
{
|
|
_IgnoreCheck = true;
|
|
}
|
|
|
|
public void SetValue(Decimal input)
|
|
{
|
|
var dec = input.ToString("#.00").Replace(".", ",");
|
|
var tester = Math.Abs(input).ToString("#.00").Replace(".", "");
|
|
|
|
if (tester.Length < MinStellen || tester.Length > MaxStellen)
|
|
{
|
|
throw new NotImplementedException("Error Code: 3483091097895");
|
|
}
|
|
else
|
|
{
|
|
_Value = dec;
|
|
}
|
|
}
|
|
}
|
|
}
|