50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Dakota.Models.Daten
|
|
{
|
|
internal class Datenelementgruppe : Dateneinheit
|
|
{
|
|
public Datenelement[] Datenelemente { get; set; }
|
|
|
|
public Datenelementgruppe(string title, int count)
|
|
{
|
|
if (count < 2)
|
|
throw new ArgumentOutOfRangeException("#37493218741616891269821");
|
|
|
|
Title = title;
|
|
|
|
Datenelemente = new Datenelement[count];
|
|
}
|
|
|
|
public void SetValue(int loc, string val)
|
|
{
|
|
Datenelemente[loc].SetValue(val);
|
|
}
|
|
|
|
public string GetValue(int loc)
|
|
{
|
|
return Datenelemente[loc].GetValue();
|
|
}
|
|
|
|
public override string GetValue()
|
|
{
|
|
return string.Join(DakotaConfig.TrennzeichenInnerhalb, Datenelemente.Select(x => x.GetValue()));
|
|
}
|
|
|
|
public override bool HasValue()
|
|
{
|
|
foreach (var seg in Datenelemente)
|
|
{
|
|
if (seg.HasValue())
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|