/// /// Copyright (c) 2016-2020 Sensus Slovensko a.s. /// using System; using SharedDatabase; namespace Workplace { public class BarcodeReceivedEventArgs : EventArgs { public string Barcode; /// /// ID of a part in this workstep: /// 0 undefined /// 1 reference part /// 2..99 parts with unique codes /// 100.. parts with batch numbers /// public int IxPolozky; public CodeLocation CodeLocation; public PartError Error; public BarcodeReceivedEventArgs(string barcode, int ixPolozky, CodeLocation codeLocation) { this.Barcode = barcode; this.IxPolozky = ixPolozky; this.CodeLocation = codeLocation; } public BarcodeReceivedEventArgs(string barcode, int ixPolozky, CodeLocation codeLocation, PartError error) : this(barcode, ixPolozky, codeLocation) { this.Error = error; } } public enum PartError { None, WrongPart, /// S/N or P/N of a part is wrong FieldEmpty, /// A required field in UI is empty PrviousRecordMissing, /// Previous record in the tracing DB is missing BlacklistedPart, /// S/N of a part is on a black list ValueOutOfRange, /// Measured value is out of range UnspecifiedError, /// Other unspecified error Count } }