Пример #1
0
        public bool setData(string q)
        {
            bool r = false;

            cnx cnx = new cnx();

            if (cnx.abrir())
            {
                r = cnx.hacerHit(q);
            }
            return(r);
        }
Пример #2
0
        public bool insert()
        {
            bool   r = false;
            string q =
                "INSERT INTO AMI.dbo.Ami_Reads " +
                "(fecha_lectura, whd, cod_medidor, whr, whnet, token_result, esn, serialnumber, readjson, token_request, period) " +
                "VALUES('" + fecha_lectura.ToString("yyyy-MM-dd HH:mm:ss") + "'," + whd + ",'" + cod_medidor + "'," + whr + "," + whnet + ",'" + token_result + "','" + esn + "','" + serialnumber + "','" + readjson + "','" + token_request + "'," + period + "); ";

            cnx cnx = new cnx();

            if (cnx.abrir())
            {
                r = cnx.hacerHit(q);
            }
            return(r);
        }
Пример #3
0
        public bool insert()
        {
            bool   r = false;
            string q =
                "INSERT INTO AMI.dbo.Ami_Control " +
                "(status, token, meter, jsonData,executedDate) " +
                "VALUES( '" + status + "', '" + token + "', '" + meter + "', '" + jsonData + "', GETDATE()); ";


            cnx cnx = new cnx();

            if (cnx.abrir())
            {
                r = cnx.hacerHit(q);
            }
            return(r);
        }