From bebb83f6fcb681bf38458255c68c8976a657eceb Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 25 May 2023 14:24:58 +0200 Subject: [PATCH] SharedDatabase.Entities.Part.OraDBType removed, CodeType/CodeForm descriptions updated. --- SharedDatabase/Entities/Part.cs | 3 -- SharedDatabase/Enums.cs | 40 +++++++++---------- SharedDatabase/Mappings/PartMap.cs | 1 - TBF/Rig/DataEntry/S620/CheckItems/Barcode.cs | 2 +- TBF/Rig/DataEntry/S620/CheckItems/Keyboard.cs | 2 +- TBF/Rig/DataEntry/S620/CheckItems/OkNok.cs | 2 +- Workplace/CheckItems/Barcode.cs | 2 +- Workplace/CheckItems/BarcodeAndOraDBQuery.cs | 2 +- Workplace/CheckItems/Keyboard.cs | 2 +- Workplace/CheckItems/OkNok.cs | 2 +- Workplace/CheckItems/S640Stream.cs | 2 +- Workplace/CheckItems/SNGeneratorPrinter.cs | 2 +- Workplace/CheckItems/Scale.cs | 2 +- Workplace/WorkplaceDlg.cs | 6 +-- 14 files changed, 32 insertions(+), 38 deletions(-) diff --git a/SharedDatabase/Entities/Part.cs b/SharedDatabase/Entities/Part.cs index 95985d0ce..a6fe5bc60 100644 --- a/SharedDatabase/Entities/Part.cs +++ b/SharedDatabase/Entities/Part.cs @@ -7,7 +7,6 @@ namespace SharedDatabase.Entities { public virtual int Id { get; protected set; } public virtual string Name { get; set; } - public virtual string OraDBType { get; set; } public virtual string Description { get; set; } public virtual sbyte CodeType { get; set; } public virtual sbyte CodeForm { get; set; } @@ -29,7 +28,6 @@ namespace SharedDatabase.Entities Part rslt = new Part(); rslt.Name = Name; - rslt.OraDBType = OraDBType; rslt.Description = Description; rslt.CodeType = CodeType; rslt.CodeForm = CodeForm; @@ -69,7 +67,6 @@ namespace SharedDatabase.Entities public Part(string name, Process workflow, CodeType codeType, CodeForm codeForm, CodeLocation codeLocation) { Name = name; - OraDBType = string.Empty; Description = string.Empty; CodeType = (sbyte)codeType; CodeForm = (sbyte)codeForm; diff --git a/SharedDatabase/Enums.cs b/SharedDatabase/Enums.cs index a801061a5..3191914b8 100644 --- a/SharedDatabase/Enums.cs +++ b/SharedDatabase/Enums.cs @@ -15,15 +15,15 @@ namespace SharedDatabase 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, + [Description("No check")] UniqueNr = 0, + [Description("8-chars, first 3 ch = last 3 ch of SAP nr")] FlowtubeNr = 1, /// prvé 3 znaky sa zhodujú s poslednými 3 znakmi názvu + [Description("20-chars, first 8 ch = SAP nr")] FlowtubeNrLU = 2, /// začiatok kódu sa zhoduje s názvom + [Description("Batch number")] BatchNr = 3, + [Description("Batch number containing part SAP nr")] BatchNrContainingPartName = 4, + [Description("Month in form MMYY, 4 digits")] DateMMYY = 5, + [Description("Quality check")] QualityCheck = 6, + [Description("Valid purchase order from a DB")] PO = 7, /// Purchase order from OrderInfo table of MySQL DB or from VT_AUFTRAG_PD table of Oracle DB + [Description("Silicon")] Silicon = 8, /// 1. change requires special password /// 2. do not clear /// 3. save locally @@ -33,17 +33,17 @@ namespace SharedDatabase 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, + [Description("Barcode scanner")] Barcode = 0, /// Barcode + [Description("QR code scanner")] QRCode = 1, /// QR code + [Description("Keyboard")] Keyboard = 2, /// Data entered by a keyboard + [Description("OK/NOK manual entry")] OkNok = 3, /// OK/NOK or Yes/No data entered by a keyboard or a mouse + [Description("Complete S/N from DB")] SerialNr = 4, /// Complete serial number of iPERL (follows PcbNumber which is a reference part) + [Description("Camera")] Camera = 5, + [Description("Scale (mass)")] Scale = 6, + [Description("S/N generator/printer")] SNGenerator = 7, + [Description("S640 datastream")] DataStream = 8, + [Description("(spare 2)")] Spare2 = 9, + [Description("(spare 3)")] Spare3 = 10, Count } diff --git a/SharedDatabase/Mappings/PartMap.cs b/SharedDatabase/Mappings/PartMap.cs index 5a255d1bc..fc698e436 100644 --- a/SharedDatabase/Mappings/PartMap.cs +++ b/SharedDatabase/Mappings/PartMap.cs @@ -8,7 +8,6 @@ namespace SharedDatabase.Mappings { Id(x => x.Id); Map(x => x.Name); - Map(x => x.OraDBType); Map(x => x.Description); Map(x => x.CodeType); Map(x => x.CodeForm); diff --git a/TBF/Rig/DataEntry/S620/CheckItems/Barcode.cs b/TBF/Rig/DataEntry/S620/CheckItems/Barcode.cs index 598b06a94..91e26bf3a 100644 --- a/TBF/Rig/DataEntry/S620/CheckItems/Barcode.cs +++ b/TBF/Rig/DataEntry/S620/CheckItems/Barcode.cs @@ -17,7 +17,7 @@ namespace TBF.Rig.DataEntry.S620.CheckItems { public override string ToString() { - return string.Format(": {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Barcode: {0} {1}", IxPolozky, Part.Name); } FormForMechanicalMetersWithTracing parent; diff --git a/TBF/Rig/DataEntry/S620/CheckItems/Keyboard.cs b/TBF/Rig/DataEntry/S620/CheckItems/Keyboard.cs index 227c32e63..2f03efc9e 100644 --- a/TBF/Rig/DataEntry/S620/CheckItems/Keyboard.cs +++ b/TBF/Rig/DataEntry/S620/CheckItems/Keyboard.cs @@ -14,7 +14,7 @@ namespace TBF.Rig.DataEntry.S620.CheckItems { public override string ToString() { - return string.Format("Kbd: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Kbd: {0} {1}", IxPolozky, Part.Name); } FormForMechanicalMetersWithTracing parent; diff --git a/TBF/Rig/DataEntry/S620/CheckItems/OkNok.cs b/TBF/Rig/DataEntry/S620/CheckItems/OkNok.cs index eb4c5acdc..ff3ae8440 100644 --- a/TBF/Rig/DataEntry/S620/CheckItems/OkNok.cs +++ b/TBF/Rig/DataEntry/S620/CheckItems/OkNok.cs @@ -13,7 +13,7 @@ namespace TBF.Rig.DataEntry.S620.CheckItems { public override string ToString() { - return string.Format("Ok/Nok: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Ok/Nok: {0} {1}", IxPolozky, Part.Name); } FormForMechanicalMetersWithTracing parent; diff --git a/Workplace/CheckItems/Barcode.cs b/Workplace/CheckItems/Barcode.cs index f4a3115b5..adda26cb5 100644 --- a/Workplace/CheckItems/Barcode.cs +++ b/Workplace/CheckItems/Barcode.cs @@ -17,7 +17,7 @@ namespace Workplace.CheckItems { public override string ToString() { - return string.Format(": {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Barcode: {0} {1}", IxPolozky, Part.Name); } WorkplaceDlg parent; diff --git a/Workplace/CheckItems/BarcodeAndOraDBQuery.cs b/Workplace/CheckItems/BarcodeAndOraDBQuery.cs index 762b3ed42..08e1e3dd1 100644 --- a/Workplace/CheckItems/BarcodeAndOraDBQuery.cs +++ b/Workplace/CheckItems/BarcodeAndOraDBQuery.cs @@ -19,7 +19,7 @@ namespace Workplace.CheckItems { public override string ToString() { - return string.Format(": {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Barcode+DBquery: {0} {1}", IxPolozky, Part.Name); } WorkplaceDlg parent; diff --git a/Workplace/CheckItems/Keyboard.cs b/Workplace/CheckItems/Keyboard.cs index 46ef5dd32..3cc6640fe 100644 --- a/Workplace/CheckItems/Keyboard.cs +++ b/Workplace/CheckItems/Keyboard.cs @@ -11,7 +11,7 @@ namespace Workplace.CheckItems { public override string ToString() { - return string.Format("Kbd: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Kbd: {0} {1}", IxPolozky, Part.Name); } WorkplaceDlg parent; diff --git a/Workplace/CheckItems/OkNok.cs b/Workplace/CheckItems/OkNok.cs index 3d9c71f55..91b7c72fd 100644 --- a/Workplace/CheckItems/OkNok.cs +++ b/Workplace/CheckItems/OkNok.cs @@ -10,7 +10,7 @@ namespace Workplace.CheckItems { public override string ToString() { - return string.Format("Ok/Nok: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Ok/Nok: {0} {1}", IxPolozky, Part.Name); } WorkplaceDlg parent; diff --git a/Workplace/CheckItems/S640Stream.cs b/Workplace/CheckItems/S640Stream.cs index 15890606f..17d8a2ae3 100644 --- a/Workplace/CheckItems/S640Stream.cs +++ b/Workplace/CheckItems/S640Stream.cs @@ -18,7 +18,7 @@ namespace Workplace.CheckItems public override string ToString() { - return string.Format("S640Stream: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("S640Stream: {0} {1}", IxPolozky, Part.Name); } /// diff --git a/Workplace/CheckItems/SNGeneratorPrinter.cs b/Workplace/CheckItems/SNGeneratorPrinter.cs index da992c2e5..57e111a6e 100644 --- a/Workplace/CheckItems/SNGeneratorPrinter.cs +++ b/Workplace/CheckItems/SNGeneratorPrinter.cs @@ -18,7 +18,7 @@ namespace Workplace.CheckItems public override string ToString() { - return string.Format("SNGeneratorPrinter: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("S/N-generator: {0} {1}", IxPolozky, Part.Name); } WorkplaceDlg parent; diff --git a/Workplace/CheckItems/Scale.cs b/Workplace/CheckItems/Scale.cs index d6e15ed57..61f6dc78f 100644 --- a/Workplace/CheckItems/Scale.cs +++ b/Workplace/CheckItems/Scale.cs @@ -22,7 +22,7 @@ namespace Workplace.CheckItems public override string ToString() { - return string.Format("Scale: {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType); + return string.Format("Scale: {0} {1}", IxPolozky, Part.Name); } public string ClassName { get { return "Scale"; } } diff --git a/Workplace/WorkplaceDlg.cs b/Workplace/WorkplaceDlg.cs index 5cbdfb34e..1789c73f5 100644 --- a/Workplace/WorkplaceDlg.cs +++ b/Workplace/WorkplaceDlg.cs @@ -1349,15 +1349,13 @@ namespace Workplace } else { - records.Add(new Record(refRecord, stepRecord, komponenty[i].Part.Name, komponenty[i].ScannedCode, - result, komponenty[i].Part.OraDBType)); + records.Add(new Record(refRecord, stepRecord, komponenty[i].Part.Name, komponenty[i].ScannedCode, result)); } } for (int i = 0; i < palety.Count; i++) { - records.Add(new Record(refRecord, stepRecord, palety[i].Part.Name, palety[i].ScannedCode, - result, komponenty[i].Part.OraDBType)); + records.Add(new Record(refRecord, stepRecord, palety[i].Part.Name, palety[i].ScannedCode, result)); } return stepRecord;