You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Security;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Rs.MotionPlat.Commom
|
|
|
|
|
{
|
|
|
|
|
public enum EUserLevel
|
|
|
|
|
{
|
|
|
|
|
Vender,
|
|
|
|
|
Op,
|
|
|
|
|
Admin
|
|
|
|
|
}
|
|
|
|
|
public class GlobalUser
|
|
|
|
|
{
|
|
|
|
|
public static string UserName;
|
|
|
|
|
public static EUserLevel UserLevel;
|
|
|
|
|
|
|
|
|
|
public static bool IsNologin()
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(UserName))
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
public static bool IsOp()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == "操作员")
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsVender()
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(UserName) && UserName == "厂商")
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
public static bool IsSuper()
|
|
|
|
|
{
|
|
|
|
|
if(!string.IsNullOrEmpty(UserName) && UserName=="超级用户")
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|