using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using wcftest.EnumDefine;
|
using wcftest.EnumDefine.Sys;
|
using wcftest.orm;
|
|
namespace wcftest.Utils.AuthFacotry
|
{
|
public class AuthHandler
|
{
|
public dbModel mod;
|
public roleMenu ROLEid;
|
public Menu_IdEnum menu_IdEnum;
|
public AuthHandler(dbModel _mod, roleMenu _ROLEid, Menu_IdEnum _menu_IdEnum)
|
{
|
mod = _mod;
|
ROLEid = _ROLEid;
|
menu_IdEnum = _menu_IdEnum;
|
}
|
public List<Sys_RoleAuth> QueryButtonAuth(dbModel mod, roleMenu ROLEid, Menu_IdEnum menu_IdEnum)
|
{
|
string roleSQL = "SELECT * FROM [YrtWMS_Siemens2].[dbo].[Sys_RoleAuth] WITH(NOLOCK) where Menu_Id=" + (int)menu_IdEnum + " and Role_Id=" + ROLEid.role_Id;
|
var roleishave = mod.Database.SqlQuery<Sys_RoleAuth>(roleSQL).ToList();
|
return roleishave;
|
}
|
public virtual void GetButtonAuthStr<T>(ref msgss<T> msg)
|
{
|
msg.buttonAuth = "";
|
}
|
}
|
}
|