initialize
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
namespace com.itac.mes.proxy
|
||||
{
|
||||
public class MslLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// SetupCenter has it's own values for the MSL Levels. These are defined as constants
|
||||
/// This function returns the value from MsdLevel as a String (lower case);
|
||||
/// </summary>
|
||||
/// <param name="mslLevel"></param>
|
||||
/// <returns></returns>
|
||||
public static string toString(int msdLevel)
|
||||
{
|
||||
switch (msdLevel)
|
||||
{
|
||||
case 1: return "1";
|
||||
case 2: return "2";
|
||||
case 3: return "2a";
|
||||
case 4: return "3";
|
||||
case 5: return "4";
|
||||
case 6: return "5";
|
||||
case 7: return "5a";
|
||||
case 8: return "6";
|
||||
default: return "1";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// convert a level as it is used in iTAC.MES.Suite to a value used in SetupCenter
|
||||
/// </summary>
|
||||
/// <param name="itacLevel"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public static int toCode(string itacLevel)
|
||||
{
|
||||
switch (itacLevel)
|
||||
{
|
||||
case "1": return 1;
|
||||
case "2": return 2;
|
||||
case "2a": case "2A": return 3;
|
||||
case "3": return 4;
|
||||
case "4": return 5;
|
||||
case "5": return 6;
|
||||
case "5a": case "5A": return 7;
|
||||
case "6": return 8;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user