45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
|
|
using DTS.Common.Base;
|
||
|
|
using DTS.Common.Interface.Channels;
|
||
|
|
using System.Data;
|
||
|
|
|
||
|
|
namespace DTS.Common.Classes.Groups.ChannelSettings
|
||
|
|
{
|
||
|
|
public class GroupChannelSettingRecord : BasePropertyChanged, IGroupChannelSettingRecord
|
||
|
|
{
|
||
|
|
private long _channelId;
|
||
|
|
public long ChannelId
|
||
|
|
{
|
||
|
|
get => _channelId;
|
||
|
|
set => SetProperty(ref _channelId, value, "ChannelId");
|
||
|
|
}
|
||
|
|
private int _settingId;
|
||
|
|
public int SettingId
|
||
|
|
{
|
||
|
|
get => _settingId;
|
||
|
|
set => SetProperty(ref _settingId, value, "SettingId");
|
||
|
|
}
|
||
|
|
private string _settingValue;
|
||
|
|
public string SettingValue
|
||
|
|
{
|
||
|
|
get => _settingValue;
|
||
|
|
set => SetProperty(ref _settingValue, value, "SettingValue");
|
||
|
|
}
|
||
|
|
public GroupChannelSettingRecord() { }
|
||
|
|
public GroupChannelSettingRecord(IDataReader reader, int storedProcedureVersionUsed)
|
||
|
|
{
|
||
|
|
if (storedProcedureVersionUsed >= Constants.BULK_GROUPCHANNELSETTINGS_GET_DB_VERSION)
|
||
|
|
{
|
||
|
|
ChannelId = Utility.GetLong(reader, "ChannelId");
|
||
|
|
}
|
||
|
|
SettingId = Utility.GetInt(reader, "SettingId");
|
||
|
|
SettingValue = Utility.GetString(reader, "SettingValue");
|
||
|
|
}
|
||
|
|
public GroupChannelSettingRecord(long channelId, int settingId, string settingValue)
|
||
|
|
{
|
||
|
|
ChannelId = channelId;
|
||
|
|
SettingId = settingId;
|
||
|
|
SettingValue = settingValue;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|