예제 #1
0
        public List <int> GetDepIDs(int userid)
        {
            List <int> list = new List <int>();
            var        dr   = SqlEasy.ExecuteDataReader("select depid from Sys_Users_Departments where userid=@UserID", new SqlParameter("@UserID", userid));

            while (dr.Read())
            {
                list.Add(PublicMethod.GetInt(dr[0]));
            }
            return(list);
        }
예제 #2
0
        public string GetDepIDs(int roleid)
        {
            string temp = "";
            var    dr   = SqlEasy.ExecuteDataReader("select depid from Sys_Roles_Departments where roleid=@RoleID", new SqlParameter("@RoleID", roleid));

            while (dr.Read())
            {
                temp += dr.GetInt32(0) + ",";
            }
            return(temp.TrimEnd(','));
        }
예제 #3
0
        public List <string> GetDepIDs(string userid)
        {
            List <string> list = new List <string>();
            var           dr   = SqlEasy.ExecuteDataReader("select depid from Sys_Users_Departments where userid=:UserID", new OracleParameter("UserID", userid));

            while (dr.Read())
            {
                list.Add(PublicMethod.GetString(dr[0]));
            }
            return(list);
        }