init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace DatabaseImport
|
||||
{
|
||||
public class CustomerDetails //: BasePropertyChanged
|
||||
{
|
||||
private readonly ISO.CustomerDetails _customerDetails;
|
||||
public string Name
|
||||
{
|
||||
get => _customerDetails.Name;
|
||||
set => _customerDetails.Name = value;
|
||||
}
|
||||
}
|
||||
public class CustomerDetailsList //: BasePropertyChanged
|
||||
{
|
||||
public static void DeleteAll()
|
||||
{
|
||||
ISO.CustomerDetails.DeleteCustomerDetails();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace DatabaseImport
|
||||
{
|
||||
public class LabratoryDetails //: BasePropertyChanged
|
||||
{
|
||||
private readonly ISO.LabratoryDetails _lab;
|
||||
public string Name
|
||||
{
|
||||
get => _lab.Name;
|
||||
set => _lab.Name = value;
|
||||
}
|
||||
}
|
||||
public class LabratoryDetailsList
|
||||
{
|
||||
public static void DeleteAll()
|
||||
{
|
||||
ISO.LabratoryDetails.DeleteLabratoryDetails();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DatabaseImport
|
||||
{
|
||||
public class TestEngineerDetails //: BasePropertyChanged
|
||||
{
|
||||
private ISO.TestEngineerDetails _testEngineerDetails;
|
||||
public string Name
|
||||
{
|
||||
get => _testEngineerDetails.Name;
|
||||
set => _testEngineerDetails.Name = value;
|
||||
}
|
||||
public TestEngineerDetails()
|
||||
{
|
||||
_testEngineerDetails = new ISO.TestEngineerDetails();
|
||||
_testEngineerDetails.Name = "(none)";
|
||||
}
|
||||
public TestEngineerDetails(ISO.TestEngineerDetails testEngineerDetails)
|
||||
{
|
||||
_testEngineerDetails = new ISO.TestEngineerDetails(testEngineerDetails);
|
||||
}
|
||||
}
|
||||
public class TestEngineerDetailsList //: BasePropertyChanged
|
||||
{
|
||||
private static TestEngineerDetailsList _testEngineerList = new TestEngineerDetailsList();
|
||||
public static TestEngineerDetailsList TestEngineerList => _testEngineerList;
|
||||
private static object _testEngineerLock = new object();
|
||||
private static Dictionary<string, TestEngineerDetails> _testEngineers = null;
|
||||
private void PopulateEngineers()
|
||||
{
|
||||
_testEngineers = new Dictionary<string, TestEngineerDetails>();
|
||||
foreach (var t in _testEngineerList.GetAllTestEngineers())
|
||||
{
|
||||
if (!_testEngineers.ContainsKey(t.Name)) { _testEngineers.Add(t.Name, t); }
|
||||
}
|
||||
}
|
||||
public void ReloadAll()
|
||||
{
|
||||
lock (_testEngineerLock)
|
||||
{
|
||||
PopulateEngineers();
|
||||
}
|
||||
}
|
||||
public static void DeleteAll()
|
||||
{
|
||||
_testEngineers = null;
|
||||
ISO.TestEngineerDetails.DeleteAllTestEngineerDetails();
|
||||
}
|
||||
|
||||
private TestEngineerDetails[] GetAllTestEngineers()
|
||||
{
|
||||
var list = new List<TestEngineerDetails>();
|
||||
list.Add(new TestEngineerDetails()); //This is the "(none)" entry
|
||||
foreach (var ts in ISO.TestEngineerDetails.GetAllTestEngineerDetails())
|
||||
{
|
||||
list.Add(new TestEngineerDetails(ts));
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user