using DTS.Common.Interface.Groups; using System.Data; namespace DTS.Common.Classes.Groups { /// /// represents an association of groups to test setups and additional /// test setup specific meta data for a group /// /// public class TestSetupGroupRecord : Base.BasePropertyChanged, ITestSetupGroupRecord { private int _groupId = -1; /// /// database id of group /// public int GroupId { get => _groupId; set => SetProperty(ref _groupId, value, "GroupId"); } private int _displayOrder = -1; /// /// display order of group /// public int DisplayOrder { get => _displayOrder; set => SetProperty(ref _displayOrder, value, "DisplayOrder"); } private string _position = ""; /// /// Position field (ISO 13499) for group, if available /// [groups can be made of mixed position fields] /// public string Position { get => _position; set => SetProperty(ref _position, value, "Position"); } private string _testObjectType = ""; /// /// Test Object field (ISO 13499) for group, if available /// [groups can be made of mixed test object fields] /// public string TestObjectType { get => _testObjectType; set => SetProperty(ref _testObjectType, value, "TestObjectType"); } private int _testSetupId = -1; /// /// database id of test setup group belongs to /// public int TestSetupId { get => _testSetupId; set => SetProperty(ref _testSetupId, value, "TestSetupId"); } public TestSetupGroupRecord() { } /// /// creates record using data reader /// /// public TestSetupGroupRecord(IDataReader reader) { GroupId = Utility.GetInt(reader, "GroupId"); DisplayOrder = Utility.GetInt(reader, "DisplayOrder"); Position = Utility.GetString(reader, "Position"); TestObjectType = Utility.GetString(reader, "TestObjectType"); TestSetupId = Utility.GetInt(reader, "TestSetupId"); } /// /// copy constructor /// /// public TestSetupGroupRecord(ITestSetupGroupRecord copy) { GroupId = copy.GroupId; DisplayOrder = copy.DisplayOrder; Position = copy.Position; TestObjectType = copy.TestObjectType; TestSetupId = copy.TestSetupId; } } }