init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class CalculatedChannels
|
||||
{
|
||||
public const string Table = "tblCalculatedChannels";
|
||||
public enum Fields
|
||||
{
|
||||
[DbTypeAttr("INTEGER PRIMARY KEY NOT NULL")]
|
||||
Id,
|
||||
[DbTypeAttr("INTEGER")]
|
||||
Operation,
|
||||
[DbTypeAttr("NVARCHAR(255)")]
|
||||
CalculatedChannelValueCode,
|
||||
[DbTypeAttr("BLOB")]
|
||||
InputChannelIds,
|
||||
[DbTypeAttr("NVARCHAR(255)")]
|
||||
CFCForInputChannels,
|
||||
[DbTypeAttr("NVARCHAR(255)")]
|
||||
CFCForOutput,
|
||||
[DbTypeAttr("NVARCHAR(255)")]
|
||||
TestSetupName,
|
||||
[DbTypeAttr("NVARCHAR(255)")]
|
||||
CCName
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Common/DTS.Common.Storage/Classes/Abstract/DbVersions.cs
Normal file
16
Common/DTS.Common.Storage/Classes/Abstract/DbVersions.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
namespace Storage.Classes.Abstract
|
||||
{
|
||||
public abstract class DbVersions
|
||||
{
|
||||
public enum DbVersionFields
|
||||
{
|
||||
Version,
|
||||
Step,
|
||||
Date,
|
||||
Remarks,
|
||||
UserField
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class DigitalOutputSettings
|
||||
{
|
||||
public const string Table = "tblTOMDigitalChannels";
|
||||
public enum Fields
|
||||
{
|
||||
ChannelDescription,
|
||||
DelayMS,
|
||||
DurationMS,
|
||||
OutputMode,
|
||||
LimitDuration,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
Version,
|
||||
LocalOnly,
|
||||
DurationMSFloat,
|
||||
UserTags
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class LabratoryDetails
|
||||
{
|
||||
public const string Table = "tblLabratoryDetails";
|
||||
public enum LabratoryDetailsFields
|
||||
{
|
||||
Name,
|
||||
LabratoryName,
|
||||
LabratoryContactName,
|
||||
LabratoryContactPhone,
|
||||
LabratoryContactFax,
|
||||
LabratoryContactEmail,
|
||||
LabratoryTestRefNumber,
|
||||
LabratoryProjectRefNumber,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
LocalOnly,
|
||||
Version
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Common/DTS.Common.Storage/Classes/Abstract/LevelTriggers.cs
Normal file
41
Common/DTS.Common.Storage/Classes/Abstract/LevelTriggers.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class LevelTriggers
|
||||
{
|
||||
public const string Table = "tblLevelTriggers";
|
||||
public enum Fields
|
||||
{
|
||||
[DbTypeAttr("NVARCHAR(255) NOT NULL")]
|
||||
TestSetupName,
|
||||
[DbTypeAttr("NVARCHAR(255) NOT NULL")]
|
||||
GroupSerialNumber,
|
||||
[DbTypeAttr("NVARCHAR(255) NOT NULL")]
|
||||
TestObjectChannelId,
|
||||
[DbTypeAttr("NVARCHAR(255) NOT NULL")]
|
||||
HardwareChannelId,
|
||||
[DbTypeAttr("NVARCHAR(255) NOT NULL")]
|
||||
SensorSerialNumber,
|
||||
[DbTypeAttr("BIT NOT NULL")]
|
||||
GreaterThanEnabled,
|
||||
[DbTypeAttr("FLOAT NOT NULL")]
|
||||
GreaterThanEU,
|
||||
[DbTypeAttr("BIT NOT NULL")]
|
||||
LessThanEnabled,
|
||||
[DbTypeAttr("FLOAT NOT NULL")]
|
||||
LessThanEU,
|
||||
[DbTypeAttr("FLOAT NULL")]
|
||||
InsideUpperEU,
|
||||
[DbTypeAttr("FLOAT NULL")]
|
||||
InsideLowerEU,
|
||||
[DbTypeAttr("FLOAT NULL")]
|
||||
OutsideUpperEU,
|
||||
[DbTypeAttr("FLOAT NULL")]
|
||||
OutsideLowerEU,
|
||||
[DbTypeAttr("BIT NULL")]
|
||||
TriggerInside,
|
||||
[DbTypeAttr("BIT NULL")]
|
||||
TriggerOutside
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class MMEPossibleChannels
|
||||
{
|
||||
public const string Table = "tblMMEPossibleChannels";
|
||||
}
|
||||
}
|
||||
118
Common/DTS.Common.Storage/Classes/Abstract/SensorDB.cs
Normal file
118
Common/DTS.Common.Storage/Classes/Abstract/SensorDB.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
|
||||
public abstract class SensorDB
|
||||
{
|
||||
public const string SensorCalibrationTable = "tblSensorCalibrations";
|
||||
public const string SensorDataTable = "tblSensors";
|
||||
public const string SensorModelsTable = "tblSensorModels";
|
||||
|
||||
public enum SensorDataFields
|
||||
{
|
||||
SerialNumber = 1,
|
||||
UserSerialNumber,
|
||||
Model,
|
||||
Manufacturer,
|
||||
Status,
|
||||
MeasurementUnit,
|
||||
OffsetToleranceLow,
|
||||
OffsetToleranceHigh,
|
||||
Id,
|
||||
Capacity,
|
||||
Comment,
|
||||
BridgeType,
|
||||
BridgeLegMode,
|
||||
Shunt,
|
||||
Invert,
|
||||
UserValue1,
|
||||
UserValue2,
|
||||
UserValue3,
|
||||
FilterClass,
|
||||
BridgeResistance,
|
||||
IsoCode,
|
||||
CheckOffset,
|
||||
SupportedExcitation,
|
||||
InitialEU,
|
||||
CalInterval,
|
||||
CalibrationSignal,
|
||||
InternalShuntResistance,
|
||||
ExternalShuntResistance,
|
||||
UniPolar,
|
||||
RangeLow,
|
||||
RangeAve,
|
||||
RangeHigh,
|
||||
Created,
|
||||
TimesUsed,
|
||||
SensorCategory,
|
||||
BypassFilter,
|
||||
CouplingMode,
|
||||
Version,
|
||||
LastModified,
|
||||
ModifiedBy,
|
||||
LocalOnly,
|
||||
AxisNumber,
|
||||
NumberOfAxes,
|
||||
UserTags,
|
||||
DoNotUse,
|
||||
Broken
|
||||
}
|
||||
public enum SensorModelFields
|
||||
{
|
||||
Model,
|
||||
Manufacturer,
|
||||
UserPartNumber,
|
||||
Capacity,
|
||||
OffsetToleranceLow,
|
||||
OffsetToleranceHigh,
|
||||
MeasurementUnit,
|
||||
Bridge,
|
||||
Shunt,
|
||||
BridgeResistance,
|
||||
FilterClass,
|
||||
UniPolar,
|
||||
IgnoreRange,
|
||||
CouplingMode,
|
||||
Version,
|
||||
RangeLow,
|
||||
RangeAve,
|
||||
RangeHigh,
|
||||
LastModified,
|
||||
ModifiedBy,
|
||||
LocalOnly,
|
||||
NumberOfAxes,
|
||||
CalInterval,
|
||||
AxisNumber,
|
||||
Polarity,
|
||||
Invert,
|
||||
CheckOffset,
|
||||
CalibrationRecord,
|
||||
ISOCode,
|
||||
SupportedExcitation
|
||||
}
|
||||
public enum SensorCalibrationFields
|
||||
{
|
||||
SerialNumber,
|
||||
CalibrationDate,
|
||||
Username,
|
||||
LocalOnly,
|
||||
NonLinear,
|
||||
CalibrationRecords,
|
||||
ModifyDate,
|
||||
IsProportional,
|
||||
RemoveOffset,
|
||||
ZeroMethod,
|
||||
CertificationDocuments,
|
||||
InitialOffset
|
||||
}
|
||||
public enum SensorCalibrationRecordFields
|
||||
{
|
||||
Sensitivity,
|
||||
Poly,
|
||||
AtCapacity,
|
||||
EngineeringUnits,
|
||||
Excitation,
|
||||
CapacityOutputIsBasedOn,
|
||||
SensitivityUnits
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Common/DTS.Common.Storage/Classes/Abstract/Settings.cs
Normal file
16
Common/DTS.Common.Storage/Classes/Abstract/Settings.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
|
||||
public abstract class Settings
|
||||
{
|
||||
public const string Table = "tblSettings";
|
||||
public enum UserFields
|
||||
{
|
||||
PropertyId,
|
||||
PropertyType,
|
||||
PropertyValue,
|
||||
UserId
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
32
Common/DTS.Common.Storage/Classes/Abstract/Squib.cs
Normal file
32
Common/DTS.Common.Storage/Classes/Abstract/Squib.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class Squib
|
||||
{
|
||||
public const string Table = "tblTOMSquibChannels";
|
||||
public enum Fields
|
||||
{
|
||||
SquibDescription,
|
||||
BypassCurrentFilter,
|
||||
BypassVoltageFilter,
|
||||
DelayMS,
|
||||
DurationMS,
|
||||
FireMode,
|
||||
ISOCode,
|
||||
MeasurementType,
|
||||
SquibOutputCurrent,
|
||||
SquibToleranceLow,
|
||||
SquibToleranceHigh,
|
||||
LimitDuration,
|
||||
ArticleId,
|
||||
LocalOnly,
|
||||
Version,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
UserValue1,
|
||||
UserValue2,
|
||||
UserValue3,
|
||||
UserTags
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
21
Common/DTS.Common.Storage/Classes/Abstract/Tags.cs
Normal file
21
Common/DTS.Common.Storage/Classes/Abstract/Tags.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class Tags
|
||||
{
|
||||
public const string Table = "tblTags";
|
||||
public enum TagFields
|
||||
{
|
||||
TagId,
|
||||
TagText,
|
||||
Obsolete
|
||||
}
|
||||
|
||||
public const string TAGASSIGNMENTS_TABLE = "TagAssignments";
|
||||
public enum TagAssignmentFields
|
||||
{
|
||||
ObjectID,
|
||||
ObjectType,
|
||||
TagID
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class TestObjectChannelSettings
|
||||
{
|
||||
public const string TableName = "tblTestObjectChannelSettings";
|
||||
public enum Fields
|
||||
{
|
||||
TestObjectSerial,
|
||||
ChannelId,
|
||||
Setting,
|
||||
SensorSerial
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
157
Common/DTS.Common.Storage/Classes/Abstract/TestSetups.cs
Normal file
157
Common/DTS.Common.Storage/Classes/Abstract/TestSetups.cs
Normal file
@@ -0,0 +1,157 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class TestSetups
|
||||
{
|
||||
public const string HardwareTable = "tblTestSetupHardware";
|
||||
public enum HardwareFields
|
||||
{
|
||||
TestSetupName,
|
||||
HardwareId,
|
||||
AddOrRemove //0=remove,1=add
|
||||
}
|
||||
|
||||
public const string DASSettingsTable = "tblTestSetupDASSettings";
|
||||
|
||||
public const string ChannelSettingsTable = "tblTestChannelSettings";
|
||||
public enum ChannelSettingFields
|
||||
{
|
||||
TestName,
|
||||
TestObjectName,
|
||||
ChannelId,
|
||||
Setting,
|
||||
SensorSerial
|
||||
}
|
||||
public const string TestSetupsTable = "tblTestSetups";
|
||||
public enum Fields
|
||||
{
|
||||
SetupName,
|
||||
SetupDescription,
|
||||
AutomaticTestProgression,
|
||||
AutomaticProgressionDelayMS,
|
||||
InvertTrigger,
|
||||
InvertStart,
|
||||
ViewDiagnostics,
|
||||
VerifyChannels,
|
||||
AutoVerifyChannels,
|
||||
VerifyChannelsDelayMS,
|
||||
RecordingMode,
|
||||
SamplesPerSecond,
|
||||
PreTriggerSeconds,
|
||||
PostTriggerSeconds,
|
||||
StrictDiagnostics,
|
||||
RequireConfirmationOnErrors,
|
||||
ROIDownload,
|
||||
ViewROIDownload,
|
||||
DownloadAll,
|
||||
ViewRealtime,
|
||||
RealtimePlotCount,
|
||||
ROIStart,
|
||||
ROIEnd,
|
||||
ViewDownloadAll,
|
||||
Export,
|
||||
ExportFormat,
|
||||
LabDetails,
|
||||
UseLabDetails,
|
||||
CustomerDetails,
|
||||
UseCustomerDetails,
|
||||
AllowMissingSensors,
|
||||
AllowSensorIdToBlankChannel,
|
||||
LocalOnly,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
TurnOffExcitation,
|
||||
TriggerCheckRealtime,
|
||||
TriggerCheckStep,
|
||||
PostTestDiagnostics,
|
||||
ExportFolder,
|
||||
DownloadFolder,
|
||||
CommonStatusLine,
|
||||
SameAsDownloadFolder,
|
||||
UploadData,
|
||||
UploadDataFolder,
|
||||
Settings,
|
||||
WarnOnBatteryFail,
|
||||
Dirty,
|
||||
Complete,
|
||||
ErrorMessage,
|
||||
TestEngineerDetails,
|
||||
UseTestEngineerDetails,
|
||||
UserTags,
|
||||
DoAutoArm,
|
||||
CheckoutMode,
|
||||
QuitTestWithoutWarning,
|
||||
SuppressMissingSensorsWarning,
|
||||
ISFFile,
|
||||
NotAllChannelsRealTime,
|
||||
NotAllChannelsViewer
|
||||
}
|
||||
public const string TestSetupObjectsTable = "tblTestSetupObjects";
|
||||
public enum TestSetupObjectFields
|
||||
{
|
||||
TestObjectSerialNumber,
|
||||
TestSetupName,
|
||||
TargetSampleRate,
|
||||
ExcitationWarmupTimeMS,
|
||||
LocalOnly,
|
||||
TestObjectType,
|
||||
TestObjectPosition
|
||||
}
|
||||
public const string TestObjectMetaDataTable = "tblTestSetupObjectMetaData";
|
||||
public enum TestObjectMetaDataFields
|
||||
{
|
||||
TestObject,
|
||||
SetupName,
|
||||
PropName,
|
||||
PropValue,
|
||||
Optional,
|
||||
Version
|
||||
}
|
||||
public const string TestObjectTemplatesTable = "tblTestObjectTemplates";
|
||||
public enum TestObjectTemplatesFields
|
||||
{
|
||||
TemplateName,
|
||||
Icon,
|
||||
Description,
|
||||
LocalOnly,
|
||||
Version,
|
||||
LastModifiedBy,
|
||||
CRC32,
|
||||
TestObject,
|
||||
LastModified,
|
||||
ParentTemplate,
|
||||
SysBuilt
|
||||
}
|
||||
public const string TestObjectsTable = "tblTestObjects";
|
||||
public enum TestObjectsFields
|
||||
{
|
||||
SerialNumber,
|
||||
LastModifiedBy,
|
||||
LastModified,
|
||||
Template,
|
||||
LocalOnly,
|
||||
ParentObject,
|
||||
SysBuilt,
|
||||
Embedded,
|
||||
OriginalTemplate,
|
||||
OriginalSerialNumber
|
||||
}
|
||||
public const string TestGraphsTable = "tblTestGraphs";
|
||||
public enum GraphFields
|
||||
{
|
||||
GraphName,
|
||||
GraphDescription,
|
||||
TemplateName,
|
||||
Channels,
|
||||
UseDomainMin,
|
||||
DomainMin,
|
||||
UseDomainMax,
|
||||
DomainMax,
|
||||
UseRangeMin,
|
||||
RangeMin,
|
||||
UseRangeMax,
|
||||
RangeMax,
|
||||
Thresholds,
|
||||
LocalOnly
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Common/DTS.Common.Storage/Classes/Abstract/Users.cs
Normal file
38
Common/DTS.Common.Storage/Classes/Abstract/Users.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
/// <summary>
|
||||
/// tables and fields for user objects
|
||||
/// </summary>
|
||||
public abstract class Users
|
||||
{
|
||||
public const string USERS_TABLE = "DataPROUsers";
|
||||
public enum UserFields
|
||||
{
|
||||
ID,
|
||||
UserName,
|
||||
DisplayName,
|
||||
Password,
|
||||
Role,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
LocalOnly
|
||||
}
|
||||
|
||||
public const string UIITEMS_TABLE = "UIITEMS";
|
||||
public enum UIItemFields
|
||||
{
|
||||
ID,
|
||||
Name
|
||||
}
|
||||
|
||||
public const string USERUISETTINGS_TABLE = "UserUIItemSettings";
|
||||
public enum UserUIItemSettingFields
|
||||
{
|
||||
UserId,
|
||||
UIItemID,
|
||||
Permission,
|
||||
Visible
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
15
Common/DTS.Common.Storage/Classes/Abstract/VersionTable.cs
Normal file
15
Common/DTS.Common.Storage/Classes/Abstract/VersionTable.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public abstract class VersionTable
|
||||
{
|
||||
public enum Fields
|
||||
{
|
||||
Version,
|
||||
Step,
|
||||
Date,
|
||||
Remarks,
|
||||
UserField
|
||||
}
|
||||
public const string TableName = "tblDataPRODbVersion";
|
||||
}
|
||||
}
|
||||
74
Common/DTS.Common.Storage/Classes/DAS.cs
Normal file
74
Common/DTS.Common.Storage/Classes/DAS.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public class DAS
|
||||
{
|
||||
public const string Table = "tblDAS";
|
||||
public enum Fields
|
||||
{
|
||||
SerialNumber,
|
||||
Type,
|
||||
MaxModules,
|
||||
MaxMemory,
|
||||
MaxSampleRate,
|
||||
MinSampleRate,
|
||||
FirmwareVersion,
|
||||
CalDate,
|
||||
ProtocolVersion,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
Version,
|
||||
LocalOnly,
|
||||
LastUsed,
|
||||
LastUsedBy,
|
||||
Connection,
|
||||
Channels,
|
||||
Position,
|
||||
ChannelTypes,
|
||||
Reprogramable,
|
||||
Reconfigurable,
|
||||
IsModule
|
||||
}
|
||||
public const string TableDASChannels = "tblDASChannels";
|
||||
public enum DASChannelFields
|
||||
{
|
||||
HardwareId,
|
||||
ChannelIdx,
|
||||
SupportedBridges,
|
||||
SupportedExcitations,
|
||||
DASDisplayOrder,
|
||||
LocalOnly,
|
||||
SupportedDigitalInputModes,
|
||||
SupportedSquibFireModes,
|
||||
SupportedDigitalOutputModes,
|
||||
ModuleSerialNumber,
|
||||
ModuleArrayIndex
|
||||
}
|
||||
public const string SLICE1_PROTOTYPE = "SLICE1 Prototype";
|
||||
public const string SLICEPRO_PROTOTYPE = "SLICEPRO Prototype";
|
||||
public const string PROTOTYPE_POSITION = "Prototype";
|
||||
public const string SLICE1_5PROTOTYPE = "SLICE+ Prototype";
|
||||
public const string G5_VDSPROTOTYPE = "G5 VDS Prototype";
|
||||
public const string G5_IPORTPROTOTYPE = "G5 iPort Prototype";
|
||||
public const string TDASPRO_8MRack = "TDASPro Rack 8M Prototype";
|
||||
public const string TDASPRO_4MRack = "TDASPRO Rack 4M Prototype";
|
||||
public const string ECM_PROTOTYPE = "SLICE ECM Prototype";
|
||||
public const string SLE_PROTOTYPE = "SLICE PRO Lab Ethernet Prototype";
|
||||
public const string SDB_PROTOTYPE = "SLICE Distributor Prototype";
|
||||
public const string Slice_NanoPROTOTYPE = "SLICE Nano Prototype";
|
||||
public const string Slice_MicroPROTOTYPE = "SLICE Micro Prototype";
|
||||
public const string SLICEPRODIM_PROTOTYPE = "SLICE Pro DIM";
|
||||
public const string SLICEPROSLD_PROTOTYPE = "SLICE PRO Lab DIM";
|
||||
public const string SLICEPROTOM_PROTOTYPE = "SLICE Pro TOM";
|
||||
public const string SLICEPROSLT_PROTOTYPE = "SLICE PRO Lab TOM";
|
||||
public const string SLICEPROSIM_PROTOTYPE = "SLICE Pro SIM";
|
||||
public const string SLICEPROSLS_PROTOTYPE = "SLICE PRO Lab SIM";
|
||||
public const string SLICE1_5_MicroPROTOTYPE = "SLICE MICRO BASE+ Prototype";
|
||||
public const string G5_INDUMMYPROTOTYPE = "G5 InDummy Prototype";
|
||||
public const string SG5_PROTOTYPE = "SLICE G5 Prototype";
|
||||
public const string TDASPRO_LabRack = "TDAS PRO Lab Rack";
|
||||
public const string SLICE6_PROTOTYPE = "SLICE6 Prototype";
|
||||
public const string SLICE6DB_PROTOTYPE = "SLICE6Db Prototype";
|
||||
}
|
||||
|
||||
}
|
||||
30
Common/DTS.Common.Storage/Classes/DbTypeAttr.cs
Normal file
30
Common/DTS.Common.Storage/Classes/DbTypeAttr.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public class DbTypeAttr : Attribute
|
||||
{
|
||||
public string DbType { get; private set; }
|
||||
internal DbTypeAttr(string attr)
|
||||
{
|
||||
DbType = attr;
|
||||
}
|
||||
public static string GetDbType(object o)
|
||||
{
|
||||
if (o != null)
|
||||
{
|
||||
System.Reflection.MemberInfo[] mi = o.GetType().GetMember(o.ToString());
|
||||
if (mi != null && mi.Length > 0)
|
||||
{
|
||||
DbTypeAttr attr = Attribute.GetCustomAttribute(mi[0], typeof(DbTypeAttr)) as DbTypeAttr;
|
||||
if (null != attr)
|
||||
{
|
||||
return attr.DbType;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Common/DTS.Common.Storage/Classes/DigitalInputSettings.cs
Normal file
21
Common/DTS.Common.Storage/Classes/DigitalInputSettings.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public class DigitalInputSettings
|
||||
{
|
||||
public const string Table = "tblDigitalInputSetting";
|
||||
public enum Fields
|
||||
{
|
||||
SettingName,
|
||||
SettingMode,
|
||||
ScaleMultiplier,
|
||||
LastModified,
|
||||
LastModifiedBy,
|
||||
SensorId,
|
||||
UserValue1,
|
||||
UserValue2,
|
||||
UserValue3,
|
||||
UserTags
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
208
Common/DTS.Common.Storage/Classes/MMETables.cs
Normal file
208
Common/DTS.Common.Storage/Classes/MMETables.cs
Normal file
@@ -0,0 +1,208 @@
|
||||
namespace DTS.Storage
|
||||
{
|
||||
public class MMETables
|
||||
{
|
||||
public const string MyType = "MyType"; //This was exported in all versions up to 1.3.496 and was replaced by "CustomChannelType"
|
||||
public const string CustomChannelType = "CustomChannelType"; //This was exported in versions from 1.3.498 - 1.3.515 and was replaced by "TYPE"
|
||||
public const string Id = "Id"; //This was exported in all versions up to 1.3.515 and was replaced by "ID"
|
||||
|
||||
public const string MMEPossibleChannelsTable = "tblMMEPossibleChannels";
|
||||
public enum MMEPossibleChannelsFields
|
||||
{
|
||||
ID,
|
||||
TYPE,
|
||||
[CustomChannelFieldSize(50)]
|
||||
TEST_OBJECT,
|
||||
[CustomChannelFieldSize(50)]
|
||||
POSITION,
|
||||
[CustomChannelFieldSize(50)]
|
||||
TRANS_MAIN_LOC,
|
||||
[CustomChannelFieldSize(50)]
|
||||
FINE_LOC_1,
|
||||
[CustomChannelFieldSize(50)]
|
||||
FINE_LOC_2,
|
||||
[CustomChannelFieldSize(50)]
|
||||
FINE_LOC_3,
|
||||
[CustomChannelFieldSize(50)]
|
||||
PHYSICAL_DIMENSION,
|
||||
[CustomChannelFieldSize(50)]
|
||||
DIRECTION,
|
||||
[CustomChannelFieldSize(50)]
|
||||
DEFAULT_FILTER_CLASS,
|
||||
[CustomChannelFieldSize(100)]
|
||||
TEXT_L1,
|
||||
[CustomChannelFieldSize(100)]
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
[CustomChannelFieldSize(50)]
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
[CustomChannelFieldSize(50)]
|
||||
SORTKEY,
|
||||
[CustomChannelFieldSize(50)]
|
||||
PICTURE_SHORTNAME,
|
||||
[CustomChannelFieldSize(50)]
|
||||
LAST_CHANGE,
|
||||
[CustomChannelFieldSize(50)]
|
||||
LAST_CHANGE_TEXT,
|
||||
[CustomChannelFieldSize(50)]
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEDirectionsTable = "tblMMEDirections";
|
||||
public enum MMEDirectionsFields
|
||||
{
|
||||
s_GUID,
|
||||
DIRECTION,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
DATE,
|
||||
VERSION,
|
||||
EXPIRED,
|
||||
REMARKS,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY,
|
||||
SORTKEY
|
||||
}
|
||||
public const string MMEFilterClassesTable = "tblMMEFilterClasses";
|
||||
public enum MMEFilterClassesFields
|
||||
{
|
||||
s_GUID,
|
||||
FILTER_CLASS,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEFineLocations1Table = "tblMMEFineLocations1";
|
||||
public enum MMEFineLocations1Fields
|
||||
{
|
||||
s_GUID,
|
||||
FINE_LOC_1,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEFineLocations2Table = "tblMMEFineLocations2";
|
||||
public enum MMEFineLocations2Fields
|
||||
{
|
||||
s_GUID,
|
||||
FINE_LOC_2,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEFineLocations3Table = "tblMMEFineLocations3";
|
||||
public enum MMEFineLocations3Fields
|
||||
{
|
||||
s_GUID,
|
||||
FINE_LOC_3,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
PICTURE_SHORTNAME,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEPhysicalDimensions = "tblMMEPhysicalDimensions";
|
||||
public enum MMEPhysicalDimensionFields
|
||||
{
|
||||
s_GUID,
|
||||
PHYSICAL_DIMENSION,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
DEFAULT_UNIT,
|
||||
LENGTH_EXP,
|
||||
TIME_EXP,
|
||||
MASS_EXP,
|
||||
ELECTRIC_CURRENT_EXP,
|
||||
TEMPERATURE_EXP,
|
||||
LUMINOUS_INTENSITY_EXP,
|
||||
AMOUNT_OFSUBSTANCE_EXP,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEPositionsTable = "tblMMEPositions";
|
||||
public enum MMEPositionsFields
|
||||
{
|
||||
s_GUID,
|
||||
POSITION,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMETestObjectsTable = "tblMMETestObjects";
|
||||
public enum MMETestObjectsFields
|
||||
{
|
||||
s_GUID,
|
||||
TEST_OBJECT,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
public const string MMEMainLocationTable = "tblMMEMainLocations";
|
||||
public enum MMEMainLocationsFields
|
||||
{
|
||||
s_GUID,
|
||||
TYPE,
|
||||
TRANS_MAIN_LOC,
|
||||
TEXT_L1,
|
||||
TEXT_L2,
|
||||
VERSION,
|
||||
DATE,
|
||||
REMARKS,
|
||||
EXPIRED,
|
||||
SORTKEY,
|
||||
PICTURE_SHORTNAME,
|
||||
LAST_CHANGE,
|
||||
LAST_CHANGE_TEXT,
|
||||
HISTORY
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Common/DTS.Common.Storage/Classes/NoDBAccessException.cs
Normal file
11
Common/DTS.Common.Storage/Classes/NoDBAccessException.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Storage
|
||||
{
|
||||
|
||||
public class NoDBAccessException : Exception
|
||||
{
|
||||
public NoDBAccessException(Exception ex)
|
||||
: base(ex.Message, ex) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace DTS.Storage
|
||||
{
|
||||
#region CustomChannelFieldSizeExtensions
|
||||
public class CustomChannelFieldSizeAttribute : Attribute
|
||||
{
|
||||
internal CustomChannelFieldSizeAttribute(int size)
|
||||
{
|
||||
this.Size = size;
|
||||
}
|
||||
public int Size { get; private set; }
|
||||
}
|
||||
public static class CustomChannelFieldSizeExtensions
|
||||
{
|
||||
|
||||
public static int GetFieldSize(MMETables.MMEPossibleChannelsFields field)
|
||||
{
|
||||
return (field.GetAttribute<CustomChannelFieldSizeAttribute>()).Size;
|
||||
}
|
||||
|
||||
}
|
||||
public static class EnumExtensions
|
||||
{
|
||||
public static TAttribute GetAttribute<TAttribute>(this Enum value)
|
||||
where TAttribute : Attribute
|
||||
{
|
||||
return (value.GetType()).GetField(Enum.GetName(value.GetType(), value)).GetCustomAttributes(false).OfType<TAttribute>().SingleOrDefault();
|
||||
}
|
||||
}
|
||||
#endregion CustomChannelFieldSizeExtensions
|
||||
}
|
||||
Reference in New Issue
Block a user