87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
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;
|
|
}
|
|
}
|
|
}
|