132 lines
4.7 KiB
Plaintext
132 lines
4.7 KiB
Plaintext
using DTS.Common.Base.Classes;
|
|
using DTS.Common.Interface.TestMetaData;
|
|
using DTS.Common.Utilities.Logging;
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.IO;
|
|
using System.Xml;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace DTS.Common.Classes.TestEngineerDetails
|
|
{
|
|
public class TestEngineerDetailsDbRecord : Base.BasePropertyChanged, ITestEngineerDetailsDbRecord
|
|
{
|
|
private int _testEngineerId = -1;
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public int TestEngineerId
|
|
{
|
|
get => _testEngineerId;
|
|
set => SetProperty(ref _testEngineerId, value, "TestEngineerId");
|
|
}
|
|
|
|
private string _name = "";
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public string Name
|
|
{
|
|
get => _name;
|
|
set => SetProperty(ref _name, value, "Name");
|
|
}
|
|
|
|
private string _testEngineerName = "NOVALUE";
|
|
[DisplayResource("TestEngineerName")]
|
|
public string TestEngineerName
|
|
{
|
|
get => _testEngineerName;
|
|
set => SetProperty(ref _testEngineerName, value, "TestEngineerName");
|
|
}
|
|
|
|
private string _testEngineerPhone = "NOVALUE";
|
|
[DisplayResource("TestEngineerPhone")]
|
|
public string TestEngineerPhone
|
|
{
|
|
get => _testEngineerPhone;
|
|
set => SetProperty(ref _testEngineerPhone, value, "TestEngineerPhone");
|
|
}
|
|
|
|
private string _testEngineerFax = "NOVALUE";
|
|
[DisplayResource("TestEngineerFax")]
|
|
public string TestEngineerFax
|
|
{
|
|
get => _testEngineerFax;
|
|
set => SetProperty(ref _testEngineerFax, value, "TestEngineerFax");
|
|
}
|
|
|
|
private string _testEngineerEmail = "NOVALUE";
|
|
[DisplayResource("TestEngineerEmail")]
|
|
public string TestEngineerEmail
|
|
{
|
|
get => _testEngineerEmail;
|
|
set => SetProperty(ref _testEngineerEmail, value, "TestEngineerEmail");
|
|
}
|
|
|
|
private bool _localOnly = false;
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public bool LocalOnly
|
|
{
|
|
get => _localOnly;
|
|
set => SetProperty(ref _localOnly, value, "LocalOnly");
|
|
}
|
|
|
|
private DateTime _lastModified = DateTime.MinValue;
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public DateTime LastModified
|
|
{
|
|
get => _lastModified;
|
|
set => SetProperty(ref _lastModified, value, "LastModified");
|
|
}
|
|
|
|
private string _lastModifiedBy = "";
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public string LastModifiedBy
|
|
{
|
|
get => _lastModifiedBy;
|
|
set => SetProperty(ref _lastModifiedBy, value, "LastModifiedBy");
|
|
}
|
|
|
|
private int _version = -1;
|
|
[Browsable(false)]
|
|
[ReadOnly(true)]
|
|
public int Version
|
|
{
|
|
get => _version;
|
|
set => SetProperty(ref _version, value, "Version");
|
|
}
|
|
|
|
public TestEngineerDetailsDbRecord(ITestEngineerDetailsDbRecord testEngineerDetailsDbRecord)
|
|
{
|
|
Name = testEngineerDetailsDbRecord.Name;
|
|
TestEngineerName = testEngineerDetailsDbRecord.TestEngineerName;
|
|
TestEngineerPhone = testEngineerDetailsDbRecord.TestEngineerPhone;
|
|
TestEngineerFax = testEngineerDetailsDbRecord.TestEngineerFax;
|
|
TestEngineerEmail = testEngineerDetailsDbRecord.TestEngineerEmail;
|
|
LastModified = testEngineerDetailsDbRecord.LastModified;
|
|
Version = testEngineerDetailsDbRecord.Version;
|
|
LastModifiedBy = testEngineerDetailsDbRecord.LastModifiedBy;
|
|
LocalOnly = testEngineerDetailsDbRecord.LocalOnly;
|
|
}
|
|
public TestEngineerDetailsDbRecord() { }
|
|
public TestEngineerDetailsDbRecord(IDataReader reader)
|
|
{
|
|
Name = Utility.GetString(reader, "Name");
|
|
TestEngineerName = Utility.GetString(reader, "TestEngineerName");
|
|
TestEngineerPhone = Utility.GetString(reader, "TestEngineerPhone");
|
|
TestEngineerFax = Utility.GetString(reader, "TestEngineerFax");
|
|
TestEngineerEmail = Utility.GetString(reader, "TestEngineerEmail");
|
|
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
|
|
Version = Utility.GetInt(reader, "Version");
|
|
LastModifiedBy = Utility.GetString(reader, "LastModifiedBy");
|
|
LocalOnly = Utility.GetBool(reader, "LocalOnly");
|
|
}
|
|
public bool IsInvalidBlank()
|
|
{
|
|
return string.IsNullOrWhiteSpace(Name);
|
|
}
|
|
}
|
|
}
|