init
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using DTS.Common.Storage;
|
||||
using DTS.Common.Classes.Hardware;
|
||||
|
||||
|
||||
namespace DTS.Common.DataModel.Common.DbWrappers
|
||||
{
|
||||
public class DASGet : DASDBRecord
|
||||
{
|
||||
public DASGet() { }
|
||||
public DASGet(IDASDBRecord record) : base(record)
|
||||
{
|
||||
if (double.IsNaN(MaxAAFRate))
|
||||
{
|
||||
MaxAAFRate = MaxSampleRate / 5;
|
||||
}
|
||||
}
|
||||
public int Type { get => DASType; set => DASType = value; }
|
||||
public bool Reprogramable { get => IsProgrammable; set => IsProgrammable = value; }
|
||||
public bool Reconfigurable { get => IsReconfigurable; set => IsReconfigurable = value; }
|
||||
|
||||
/// <summary>
|
||||
/// This ensures that any bad data in the database can be repaired in one place.
|
||||
/// FB 17777
|
||||
/// </summary>
|
||||
/// <param name="serialNumber"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <returns></returns>
|
||||
public List<DASGet> DASGet_Wrapper(string serialNumber = null, string position = null)
|
||||
{
|
||||
var dasGetList = new List<DASGet>();
|
||||
|
||||
var hResult = DbOperations.DASGet(serialNumber, position, out var dbDAS);
|
||||
if (0 == hResult && null != dbDAS)
|
||||
{
|
||||
foreach (var das in dbDAS)
|
||||
{
|
||||
dasGetList.Add(new DASGet(das));
|
||||
}
|
||||
}
|
||||
|
||||
return dasGetList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user