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); }
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(',')); }
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); }