schangxiang@126.com
2025-09-19 fc752b66a7976188c4edd5e3fb7ca6bb2822e441
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 = "";
        }
    }
}