Exemplo n.º 1
0
        /// <summary>
        /// 获取用户有权限操作的二级模块
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        public DataSet GetUserOperateSubModule(string UserName)
        {
            string sql = "select distinct(m.SubModuleCode),n.MenuParent,n.MenuTitle,n.ID,n.OrderIndex " +
                         " from sys_GroupOperationList o   " +
                         " left join sys_ModuleList  m on m.ModuleID=o.ModuleID " +
                         " left join sys_GroupList g on g.GroupID=o.GroupID " +
                         " left join sys_UserLIst  u on u.GroupID=g.GroupID " +
                         " left join sys_Menu      n on n.MenuCode=m.SubModuleCode " +
                         " where n.SystemName='WMS' AND UserName='******'order by n.OrderIndex ";

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SysUserDao UserDao = new SysUserDao();
                return(UserDao.GetData(sql));
            }
        }
Exemplo n.º 2
0
        public DataSet GetUserQuickDesktop(int UserID)
        {
            string sql = "SELECT m.MenuParent, m.MenuTitle, q.ModuleID, m.MenuImage, m.DestopImage, m.MenuUrl " +
                         "FROM dbo.sys_QuickDestop AS q LEFT OUTER JOIN  dbo.sys_Menu AS m ON q.ModuleID = m.ID " +
                         "WHERE     (q.UserID = " + UserID + ") AND (q.ModuleID IN " +
                         "(SELECT DISTINCT n.ID " +
                         " FROM dbo.sys_GroupOperationList AS o LEFT OUTER JOIN " +
                         "dbo.sys_ModuleList AS m ON m.ModuleID = o.ModuleID LEFT OUTER JOIN " +
                         "dbo.sys_GroupList AS g ON g.GroupID = o.GroupID LEFT OUTER JOIN " +
                         "dbo.sys_UserList AS u ON u.GroupID = g.GroupID LEFT OUTER JOIN " +
                         " dbo.sys_Menu AS n ON n.MenuCode = m.SubModuleCode " +
                         "WHERE (u.UserID = " + UserID + "))) order by m.MenuCode";

            using (PersistentManager persistentManager = new PersistentManager())
            {
                SysUserDao UserDao = new SysUserDao();
                return(UserDao.GetData(sql));
            }
        }