Class Production
Class provided to handle unit info (on serialnumber/parnumber)
Inherited Members
Namespace: Virinco.WATS.Interface.MES.Production
Assembly: Virinco.WATS.Interface.MES.dll
Syntax
public class Production : MesBase
Constructors
Production()
Empty constructor
Declaration
public Production()
Production(String)
Constructor with Culture code
Declaration
public Production(string CultureCode)
Parameters
Type | Name | Description |
---|---|---|
System. |
CultureCode |
Fields
DisplayTreeView
If Identify
Declaration
public bool DisplayTreeView
Field Value
Type | Description |
---|---|
System. |
LastScannedSerialnumber
Holds information about the last scanned serialnumber
Declaration
public string LastScannedSerialnumber
Field Value
Type | Description |
---|---|
System. |
Methods
AddChildUnit(String, String, String, String, String, String, String, out String)
Adds a child unit. If Neither CheckPartNumber or CheckRevision is given ProductRelations according to product manager are checked
Declaration
public bool AddChildUnit(string CultureCode, string ParentSerialNumber, string ParentPartNumber, string ChildSerialNumber, string ChildPartNumber, string CheckPartNumber, string CheckRevision, out string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
CultureCode | |
System. |
ParentSerialNumber | |
System. |
ParentPartNumber | |
System. |
ChildSerialNumber | |
System. |
ChildPartNumber | |
System. |
CheckPartNumber | If given, child will be checked according to this |
System. |
CheckRevision | If given, child will be checked according to this |
System. |
message |
Returns
Type | Description |
---|---|
System. |
CreateUnit(String, String, String, String)
Creates a new unit in MES. The Partnumber and Revision must exist
Declaration
public bool CreateUnit(string SerialNumber, string PartNumber, string Revision, string batchNumber)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | |
System. |
PartNumber | |
System. |
Revision | |
System. |
batchNumber |
Returns
Type | Description |
---|---|
System. |
True if unit was created |
GetUnitInfo(String, String)
Return Unit
Declaration
public UnitInfo GetUnitInfo(string SerialNumber, string PartNumber = "")
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | |
System. |
PartNumber |
Returns
GetUnitPhase(String, String)
Get a unit's phase.
Declaration
public Unit_Phase GetUnitPhase(string SerialNumber, string PartNumber)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
Returns
Type | Description |
---|---|
Virinco. |
Units current Phase enum |
GetUnitPhaseString(String, String)
Get a unit's phase.
Declaration
public string GetUnitPhaseString(string SerialNumber, string PartNumber)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
Returns
Type | Description |
---|---|
System. |
Units current Phase as string |
GetUnitProcess(String, String)
Get a unit's current process
Declaration
public string GetUnitProcess(string SerialNumber, string PartNumber)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
Returns
Type | Description |
---|---|
System. |
Unit's current process |
GetUnitStateHistory(String, String, out String[], out String[], out DateTime[])
Returns unit history of state / phase changes. Changes are returned in three corresponding arrays due to index. Latest change is found on index 0;
Declaration
public int GetUnitStateHistory(string serialNumber, string partNumber, out string[] states, out string[] phases, out DateTime[] dateTime)
Parameters
Type | Name | Description |
---|---|---|
System. |
serialNumber | |
System. |
partNumber | |
System. |
states | Returned array of previous states |
System. |
phases | Returned array of previous phases |
System. |
dateTime | Returned array of date / time of change |
Returns
Type | Description |
---|---|
System. |
Arrays + return value -1 if error, number of changes (index range) if ok |
IdentifyUUT(out Boolean, String)
Displays SN textbox if connected to service
Declaration
public UnitInfo IdentifyUUT(out bool Continue, string PartNumber = "")
Parameters
Type | Name | Description |
---|---|---|
System. |
Continue | Boolean value indicating if the process was stopped |
System. |
PartNumber | PartNumber of unit to identify (used in case of none unique serialnumbers) |
Returns
IdentifyUUT(out Boolean, ref Process, String, String, Boolean, Boolean, String, Boolean, Boolean, StatusEnum, Dictionary<String, Object>)
Display dialog to prompt for serial number
Declaration
public UnitInfo IdentifyUUT(out bool Continue, ref Process SelectedTestOperation, string SerialNumber = "", string PartNumber = "", bool IncludeTestOperation = false, bool SelectTestOperation = true, string CustomText = null, bool AlwaysOnTop = true, bool UseWorkflow = false, StatusEnum WorkflowStatus = StatusEnum.Released, Dictionary<string, object> context = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
Continue | |
Virinco. |
SelectedTestOperation | |
System. |
SerialNumber | |
System. |
PartNumber | |
System. |
IncludeTestOperation | |
System. |
SelectTestOperation | |
System. |
CustomText | |
System. |
AlwaysOnTop | |
System. |
UseWorkflow | |
Virinco. |
WorkflowStatus | |
System. |
context |
Returns
Type | Description |
---|---|
Unit |
isConnected()
True if connected to server
Declaration
public bool isConnected()
Returns
Type | Description |
---|---|
System. |
RemoveAllChildUnits(String, String, String, out String)
Removes all children of a given unit
Declaration
public bool RemoveAllChildUnits(string CultureCode, string ParentSerialNumber, string ParentPartNumber, out string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
CultureCode | |
System. |
ParentSerialNumber | |
System. |
ParentPartNumber | |
System. |
message |
Returns
Type | Description |
---|---|
System. |
RemoveChildUnit(String, String, String, String, String, out String)
Declaration
public bool RemoveChildUnit(string CultureCode, string ParentSerialNumber, string ParentPartNumber, string ChildSerialNumber, string ChildPartNumber, out string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
CultureCode | |
System. |
ParentSerialNumber | |
System. |
ParentPartNumber | |
System. |
ChildSerialNumber | |
System. |
ChildPartNumber | |
System. |
message |
Returns
Type | Description |
---|---|
System. |
SetParent(String, String)
Create a parent child relation between two units
Declaration
public bool SetParent(string SerialNumber, string ParentSerialNumber)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Serial Number of child unit |
System. |
ParentSerialNumber | Serial Number of parent unit |
Returns
Type | Description |
---|---|
System. |
Value indicating if the action was successfull or not |
SetUnitPhase(String, String, String)
Sets a unit's phase.
Declaration
public void SetUnitPhase(string SerialNumber, string PartNumber, string Phase)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
System. |
Phase | Unit's new phase, |
SetUnitPhase(String, String, Unit_Phase)
Sets a unit's phase.
Declaration
public void SetUnitPhase(string SerialNumber, string PartNumber, Unit_Phase Phase)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
Virinco. |
Phase | Unit's new phase, |
SetUnitProcess(String, String, String)
Sets a unit's process to a given value
Declaration
public void SetUnitProcess(string SerialNumber, string PartNumber, string ProcessName)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's serial number |
System. |
PartNumber | Unit's part number |
System. |
ProcessName | Unit's new processname |
UpdateUnit(String, String, String)
Update/Change a units PartNumber and Revision
Declaration
public bool UpdateUnit(string SerialNumber, string NewPartNumber, string NewRevision)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | SerialNumber of unit to update |
System. |
NewPartNumber | New/updated PartNumber |
System. |
NewRevision | New/Updated Revision |
Returns
Type | Description |
---|---|
System. |
UpdateUnitAttribute(String, String, String)
Add/Update xml attribute value
Declaration
[Obsolete]
public bool UpdateUnitAttribute(string SerialNumber, string AttributeName, string AttributeValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
SerialNumber | Unit's SerialNumber |
System. |
AttributeName | Attribute name |
System. |
AttributeValue | Attribute value |
Returns
Type | Description |
---|---|
System. |