示例#1
0
文件: SysManager.cs 项目: ue96/ue96
 public Hashtable GetRoleHtByUser(int paramUserSysNo)
 {
     string sql = " select b.sysno, b.usersysno, b.rolesysno, a.roleid, a.rolename from sys_role as a, sys_user_role as b where a.sysno = b.rolesysno and b.usersysno =" + paramUserSysNo;
     DataSet ds = SqlHelper.ExecuteDataSet(sql);
     if ( !Util.HasMoreRow(ds))
         return null;
     Hashtable ht = new Hashtable(20);
     foreach(DataRow dr in ds.Tables[0].Rows )
     {
         UserRoleInfo item = new UserRoleInfo();
         map(item, dr);
         ht.Add(item, null);
     }
     return ht;
 }
示例#2
0
文件: SysManager.cs 项目: ue96/ue96
 private void map(UserRoleInfo oParam, DataRow tempdr)
 {
     oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]);
     oParam.UserSysNo = Util.TrimIntNull(tempdr["UserSysNo"]);
     oParam.RoleSysNo = Util.TrimIntNull(tempdr["RoleSysNo"]);
     oParam.RoleID = Util.TrimNull(tempdr["RoleID"]);
     oParam.RoleName = Util.TrimNull(tempdr["RoleName"]);
 }