tbf/SharedDatabase/Enums.cs

98 lines
3.7 KiB
C#

///
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
///
using System;
using System.Reflection;
using Common;
namespace SharedDatabase
{
public class Const
{
public const int MaxPartNameLen = 10;
}
public enum CodeType
{
[Description("")] UniqueNr = 0,
[Description("Sap6-8")] FlowtubeNr = 1, /// prvé 3 znaky sa zhodujú s poslednými 3 znakmi názvu
[Description("FT-20")] FlowtubeNrLU = 2, /// začiatok kódu sa zhoduje s názvom
[Description("1")] BatchNr = 3,
[Description("2")] BatchNrContainingPartName = 4,
[Description("3")] DateMMYY = 5,
[Description("4")] QualityCheck = 6,
[Description("Obj.")] PO = 7, /// Purchase order from Oracle table VT_AUFTRAG_PD
[Description("Silicon")] Silicon = 8,
/// 1. change requires special password
/// 2. do not clear
/// 3. save locally
/// 4. carry over to other workflows
Count
}
public enum CodeForm
{
Barcode = 0, /// Barcode
QRCode = 1, /// QR code
Keyboard = 2, /// Data entered by a keyboard
OkNok = 3, /// OK/NOK or Yes/No data entered by a keyboard or a mouse
SerialNr = 4, /// Complete serial number of iPERL (follows PcbNumber which is a reference part)
Camera = 5,
Scale = 6,
SNGenerator = 7,
DataStream = 8,
Spare2 = 9,
Spare3 = 10,
Count
}
public enum CodeLocation
{
OnPallet,
OnPart,
Count
}
public enum LifetimeManagement
{
None,
OneYear,
Count,
}
public enum ReleaseStatus
{
In_preparation, /// Process definition is not completed, cannot be used in production
ToBeApproved, /// Process is completed, protected against changes and waits for an approval
ReleasedActive, /// Process is ready for production, it is active = enabled
Released, /// Process is ready for production (completed, protected, approved), but it is inactive
Deactivated, /// Process was used in production but it was de-activated (should never be deleted as there are references to the process)
Separator, /// 'Process' is only a named separator between other process items
Count,
}
public enum Mode
{
Production, /// Stara Tura production DB is used
Test, /// Stara Tura test DB is used
ProductionLU, /// Ludwigshafen production DB is used
TestLU, /// Ludwigshafen test DB is used
NoWritesToDB, /// Stara Tura production DB - no writes to the database
Debug, /// Debug mode - no database used at all
Count,
}
public enum VerifState
{
Undefined = 0, /// Undefined (only used in OnActivity(..) when start/stop info message is issued)
SNisMissing, /// S/N is missing in the parsed record
SNisInvalid, /// S/N in the parsed record is invalid
NoRecordAtAll, /// No record with this S/N in tracing DB
VerificationIsDisabled, /// ...
NoVerificationForThisProcess,
VerificationPassed, /// Verification of a previous record passed
VerificationFailed, /// Verification of a previous record failed, no matching record found
TracingDBReadOrWriteFailed,
PrintingFailed,
}
}