Show / Hide Table of Contents

Class Production

Class provided to handle unit info (on serialnumber/parnumber)

Inheritance
System.Object
MesBase
Production
Inherited Members
MesBase.adminToken
MesBase.SetAdminCredentials(String, String)
MesBase.RESTGetJson<responseType>(String, Boolean)
MesBase.RESTPostJson<responseType>(String, Object, Boolean)
MesBase.RESTPutJson<responseType>(String, Object, Boolean)
MesBase.RESTDeleteJson<responseType>(String, Object, Boolean)
MesBase.CultureCode
MesBase.TranslateString(String, String, Object[])
MesBase.TranslateString(String, Object[])
MesBase.TranslateArray(String[])
MesBase.TranslateArray(String, String[])
MesBase.GetProcesses(Boolean, Boolean, Boolean)
MesBase.GetMesServerSettings(String[], Boolean[], Int32[], String[], String[], String[])
MesBase.GetCommonUserSettings(String)
MesBase.GetGeneralOptionString(String)
MesBase.GetGeneralOptionBool(String)
MesBase.GetGeneralOptionInt(String)
MesBase.DisplayMesTestGUI()
MesBase.GetStorageXml(String)
MesBase.GetStorageValue(String)
MesBase.PutStorageData(String, String, String)
MesBase.RemoveStorageData(String)
MesBase.RethrowException
MesBase.LastException
MesBase.LogExceptions
MesBase.StartTraceToEventLog()
MesBase.StopTraceToEventLog()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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.String CultureCode

Fields

DisplayTreeView

If IdentifyUUT(out Boolean, String) is called and this is set to true, the Display TreeView checkbox is checked. If the checkbox is not checked, the form will automatically close when the serialnumber ends with \r\n

Declaration
public bool DisplayTreeView
Field Value
Type Description
System.Boolean

LastScannedSerialnumber

Holds information about the last scanned serialnumber

Declaration
public string LastScannedSerialnumber
Field Value
Type Description
System.String

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.String CultureCode
System.String ParentSerialNumber
System.String ParentPartNumber
System.String ChildSerialNumber
System.String ChildPartNumber
System.String CheckPartNumber

If given, child will be checked according to this

System.String CheckRevision

If given, child will be checked according to this

System.String message
Returns
Type Description
System.Boolean

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.String SerialNumber
System.String PartNumber
System.String Revision
System.String batchNumber
Returns
Type Description
System.Boolean

True if unit was created

GetUnitInfo(String, String)

Return UnitInfo object (no GUI)

Declaration
public UnitInfo GetUnitInfo(string SerialNumber, string PartNumber = "")
Parameters
Type Name Description
System.String SerialNumber
System.String PartNumber
Returns
Type Description
UnitInfo

A UnitInfo object with info about the SN supplied.

GetUnitPhase(String, String)

Get a unit's phase.

Declaration
public Unit_Phase GetUnitPhase(string SerialNumber, string PartNumber)
Parameters
Type Name Description
System.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

Returns
Type Description
Virinco.WATS.Service.MES.Contract.Unit_Phase

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.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

Returns
Type Description
System.String

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.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

Returns
Type Description
System.String

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.String serialNumber
System.String partNumber
System.String[] states

Returned array of previous states

System.String[] phases

Returned array of previous phases

System.DateTime[] dateTime

Returned array of date / time of change

Returns
Type Description
System.Int32

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.Boolean Continue

Boolean value indicating if the process was stopped

System.String PartNumber

PartNumber of unit to identify (used in case of none unique serialnumbers)

Returns
Type Description
UnitInfo

A UnitInfo object of the scanned unit.

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.Boolean Continue
Virinco.WATS.Service.MES.Contract.Process SelectedTestOperation
System.String SerialNumber
System.String PartNumber
System.Boolean IncludeTestOperation
System.Boolean SelectTestOperation
System.String CustomText
System.Boolean AlwaysOnTop
System.Boolean UseWorkflow
Virinco.WATS.Service.MES.Contract.StatusEnum WorkflowStatus
System.Collections.Generic.Dictionary<System.String, System.Object> context
Returns
Type Description
UnitInfo

isConnected()

True if connected to server

Declaration
public bool isConnected()
Returns
Type Description
System.Boolean

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.String CultureCode
System.String ParentSerialNumber
System.String ParentPartNumber
System.String message
Returns
Type Description
System.Boolean

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.String CultureCode
System.String ParentSerialNumber
System.String ParentPartNumber
System.String ChildSerialNumber
System.String ChildPartNumber
System.String message
Returns
Type Description
System.Boolean

SetParent(String, String)

Create a parent child relation between two units

Declaration
public bool SetParent(string SerialNumber, string ParentSerialNumber)
Parameters
Type Name Description
System.String SerialNumber

Serial Number of child unit

System.String ParentSerialNumber

Serial Number of parent unit

Returns
Type Description
System.Boolean

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.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

System.String 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.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

Virinco.WATS.Service.MES.Contract.Unit_Phase 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.String SerialNumber

Unit's serial number

System.String PartNumber

Unit's part number

System.String 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.String SerialNumber

SerialNumber of unit to update

System.String NewPartNumber

New/updated PartNumber

System.String NewRevision

New/Updated Revision

Returns
Type Description
System.Boolean

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.String SerialNumber

Unit's SerialNumber

System.String AttributeName

Attribute name

System.String AttributeValue

Attribute value

Returns
Type Description
System.Boolean
In This Article
  • Constructors
    • Production()
    • Production(String)
  • Fields
    • DisplayTreeView
    • LastScannedSerialnumber
  • Methods
    • AddChildUnit(String, String, String, String, String, String, String, out String)
    • CreateUnit(String, String, String, String)
    • GetUnitInfo(String, String)
    • GetUnitPhase(String, String)
    • GetUnitPhaseString(String, String)
    • GetUnitProcess(String, String)
    • GetUnitStateHistory(String, String, out String[], out String[], out DateTime[])
    • IdentifyUUT(out Boolean, String)
    • IdentifyUUT(out Boolean, ref Process, String, String, Boolean, Boolean, String, Boolean, Boolean, StatusEnum, Dictionary<String, Object>)
    • isConnected()
    • RemoveAllChildUnits(String, String, String, out String)
    • RemoveChildUnit(String, String, String, String, String, out String)
    • SetParent(String, String)
    • SetUnitPhase(String, String, String)
    • SetUnitPhase(String, String, Unit_Phase)
    • SetUnitProcess(String, String, String)
    • UpdateUnit(String, String, String)
    • UpdateUnitAttribute(String, String, String)
Back to top View how-to articles, videos and more at support.virinco.com Send comments on this topic to support@virinco.com