public static ResultSet getShow(Connection conn, Map<String, String> params, Logger logger, DateFormat df) throws SQLException, InvalidParameterException {
        PreparedStatement sp = null;
        try {
            sp = conn.prepareStatement("exec dbo.Wga_GetShow ?, ?, ?, ?, ?, ?, ?");

            if (params.get(IDBUILDING) != null) {
                sp.setInt(1, Integer.parseInt(params.get(IDBUILDING)));
            } else {
                sp.setNull(1, java.sql.Types.INTEGER);
            }
            if (params.get(IDHALL) != null) {
                sp.setInt(2, Integer.parseInt(params.get(IDHALL)));
            } else {
                sp.setNull(2, java.sql.Types.INTEGER);
            }
            if (params.get(IDSHOWTYPE) != null) {
                try {
                    sp.setString(3, new String(params.get(IDSHOWTYPE).getBytes("UTF-8"), "CP1251"));
                } catch (UnsupportedEncodingException ex) {
                    logger.error("Can't convert parametr to CP1251");
                }
            } else {
                sp.setNull(3, java.sql.Types.VARCHAR);
            }
            if (params.get(IDGENRE) != null) {
                sp.setInt(4, Integer.parseInt(params.get(IDGENRE)));
            } else {
                sp.setNull(4, java.sql.Types.INTEGER);
            }
            setBeginTimeParameter(params, sp, df, logger, 5);
            setEndTimeParameter(params, sp, df, logger, 6);
            if (params.get(IDSHOW) != null) {
                sp.setInt(7, Integer.parseInt(params.get(IDSHOW)));
            } else {
                sp.setNull(7, java.sql.Types.INTEGER);
            }
            return sp.executeQuery();
        } finally {
            if (sp != null) {
                sp.close();
            }
        }
    }