using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LYFZ.ManagementService
{
public class LoginUserPrivilege
{
///
/// 检查当前用户是否有管理权限
///
///
///
///
public static bool CheckUserPrivilege(System.Windows.Forms.Form frm,bool isClose=false)
{
bool bl = false;
if (LYFZ.DAL.tb_Users.UsersModel.Privilege.ToLower().Equals("2"))
{
bl = false;
}
else {
bl = true;
}
if (!bl)
{
MessageBoxCustom.Show("对不起,你没有操作权限!");
if (isClose)
{
frm.Close();
}
}
return bl;
}
}
}