Files
DP44/Common/DTS.CommonCore/.svn/pristine/fd/fd7b0c0575b05503125211d3d8a173d1b2fdfab5.svn-base

87 lines
3.0 KiB
Plaintext
Raw Normal View History

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