Ejemplo n.º 1
0
        public Meter[] GetMetersByTcpIPGUID(Guid guid_tcpip)
        {
            string query = "SELECT meters.guid, name, address, password, password_type_hex, factory_number_manual, factory_number_readed, is_factory_numbers_equal, dt_install, dt_last_read, guid_types_meters, meters.guid_meters, time_delay_current FROM meters " +
                            "JOIN link_meters_tcpip_settings ON link_meters_tcpip_settings.guid_tcpip_settings ='" + guid_tcpip.ToString() + "' " +
                            "WHERE meters.guid = link_meters_tcpip_settings.guid_meters";

            List<Object> list = GetRecordsFromReader(query, RetrieveMeter);

            Meter[] result = new Meter[list.Count];

            for (int i = 0; i < list.Count; i++)
            {
                result[i] = (Meter)list[i];
            }

            list.Clear();

            return result;
        }
Ejemplo n.º 2
0
        public Meter[] GetMetersHavingTakenParam()
        {
            string query = "SELECT guid, name, address, password, password_type_hex, factory_number_manual, factory_number_readed, is_factory_numbers_equal, dt_install, dt_last_read, guid_types_meters, guid_meters, time_delay_current FROM meters " +
                            "GROUP BY guid HAVING (SELECT COUNT(*) FROM taken_params WHERE taken_params.guid_meters = meters.guid) > 0";

            List<Object> list = GetRecordsFromReader(query, RetrieveMeter);

            Meter[] result = new Meter[list.Count];

            for (int i = 0; i < list.Count; i++)
            {
                result[i] = (Meter)list[i];
            }

            list.Clear();

            return result;
        }
Ejemplo n.º 3
0
        public Meter[] GetMeters()
        {
            string query = "SELECT guid, name, address, password, password_type_hex, factory_number_manual, factory_number_readed, is_factory_numbers_equal, dt_install, dt_last_read, guid_types_meters, guid_meters, time_delay_current FROM meters";

            List<Object> list = GetRecordsFromReader(query, RetrieveMeter);

            Meter[] result = new Meter[list.Count];

            for (int i = 0; i < list.Count; i++)
            {
                result[i] = (Meter)list[i];
            }

            list.Clear();

            return result;
        }