|
|
|
@ -9,10 +9,11 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
{
|
|
|
|
|
public enum EUserLevel
|
|
|
|
|
{
|
|
|
|
|
Op,
|
|
|
|
|
Engineer,
|
|
|
|
|
Vender,
|
|
|
|
|
Admin
|
|
|
|
|
OP,
|
|
|
|
|
AUDIT,
|
|
|
|
|
PM,
|
|
|
|
|
ENGINEER,
|
|
|
|
|
ADMIN
|
|
|
|
|
}
|
|
|
|
|
public class GlobalUser
|
|
|
|
|
{
|
|
|
|
@ -29,7 +30,25 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
}
|
|
|
|
|
public static bool IsOp()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == "001")
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.OP.ToString())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsAudit()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.AUDIT.ToString())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsPm()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.PM.ToString())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -38,15 +57,17 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
|
|
|
|
|
public static bool IsVender()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == "002")
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.ENGINEER.ToString())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static bool IsSuper()
|
|
|
|
|
{
|
|
|
|
|
if(!string.IsNullOrEmpty(UserName) && UserName=="003")
|
|
|
|
|
if(!string.IsNullOrEmpty(UserName) && UserName== EUserLevel.ADMIN.ToString())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|