public bool update_shop_enrollment_sms(string sShopId, string sEnrollment_SMS_Text)
    {
        xSQL_UpdateBuilder ub = new xSQL_UpdateBuilder(this, "shop", "where id=" + sShopId);

        ub.add("enrollment_sms_text", sEnrollment_SMS_Text);

        bool bOK = ub.ExecuteSql();

        return bOK;
    }
    public bool update_shop_merchant_id(string sShopId, string sNewMerchantId)
    {
        xSQL_UpdateBuilder ub = new xSQL_UpdateBuilder(this, "shop", "where id=" + sShopId);

        ub.add("shop_external_id", sNewMerchantId);

        bool bOK = ub.ExecuteSql();

        return bOK;
    }
    public bool update_shop_enrollment(string sShopId, bool bAcceptAnrollment)
    {
        xSQL_UpdateBuilder ub = new xSQL_UpdateBuilder(this, "shop", "where id=" + sShopId);

        ub.add("accept_terminal_enrollment", bAcceptAnrollment);

        bool bOK = ub.ExecuteSql();

        return bOK;
    }
    public List<backoffice.dim_dim_value> verifone_to_webservice(DateTime checkDate)
    {
        List<backoffice.dim_dim_value> returnList = new List<dim_dim_value>();

        GLOBAL_SQL_CONN conn = new GLOBAL_SQL_CONN(this);

        string sXml = "";

        int iMaxSeconds = -10000;
        int iMinSeconds = 10000;

        int i = 0;

        DateTime ss = getDateTime_from_string("2015.09.12 09:40:24 534");

        string sVerifoneTimeStampRouter = "";
        string sVerifoneTimeStampRouter_1 = "";
        string sVerifoneTimeStampRouter_2 = "";


        string sVerifoneTimeStamp = "";
        string sVerifoneTimeStamp_1 = "";
        string sVerifoneTimeStamp_2 = "";

        try
        {

            // alter table webservice_log add column dt_timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT to_timestamp(0)
            // alter table webservice_log add column response_time int default 0

            string sSql =
                "select * from webservice_log where " +
                "(name like '%GetCustomerData%' and " +
                "parameters like '%_GetCustomerData_%') or " +
                "(name like '%EnrollCustomer%' and " +
                "parameters like '%_EnrollCustomer_%') " +
                "and id > 197000 order by id desc";

            GLOBAL_SQL_COMMAND command = new GLOBAL_SQL_COMMAND(sSql, conn);
            GLOBAL_SQL_READER reader = new GLOBAL_SQL_READER(command);

            while (reader.Read())
            {
                sXml = reader.c("parameters").ToString();

                XmlDocument doc = new XmlDocument();
                sXml = sXml.Replace("PROSESSOR_VAS_NO", "PROSESSOR.VAS.NO");
                sXml = sXml.Replace("VAS_PROSESSOR", "VAS.PROSESSOR");
                sXml = sXml.Replace("VAS_Name_1", "VAS.Name.1");
                sXml = sXml.Replace("_", "'");


                sXml = sXml.Replace("&lt;", "<");
                sXml = sXml.Replace("&gt;", ">");
                sXml = sXml.Replace("&quot;", "'");


                try
                {
                    if (sXml.IndexOf("RequestHeader") >= 0)
                    {
                        doc.LoadXml(sXml);

                        XmlNode requestInfo = doc.SelectSingleNode("GetCustomerData/RequestHeader/RequestInfo");

                        if (requestInfo == null)
                            requestInfo = doc.SelectSingleNode("EnrollCustomer/RequestHeader/RequestInfo");

                        sVerifoneTimeStampRouter = getSafeAttribute(requestInfo, "TimeStampRouter");
                        sVerifoneTimeStampRouter_1 = sVerifoneTimeStampRouter.Substring(0, 10);
                        sVerifoneTimeStampRouter_2 = sVerifoneTimeStampRouter.Substring(11, 8);

                        DateTime verifoneTimestamp = getDateTime_from_string(sVerifoneTimeStampRouter_1 + " " + sVerifoneTimeStampRouter_2);

                        string sId = reader.c("id").ToString();

                        string sBemberDate = reader.c("timestamp").ToString();
                        DateTime dtBember = getDateTime_from_string(sBemberDate);

                        dtBember = dtBember.Add(new TimeSpan(1, 0, 0));
                        TimeSpan ts = dtBember.Subtract(verifoneTimestamp);

                        int iSeconds = ts.Seconds;
                        int iMinutes = ts.Minutes;

                        int iResponseInSeconds = iMinutes * 60 + iSeconds;

                        if (iMinutes > 0)
                        {
                            iMinutes = iMinutes;
                        }

                        xSQL_UpdateBuilder ub = new xSQL_UpdateBuilder(this, "webservice_log", "where id=" + sId);
                        ub.add("dt_timestamp", dtBember);
                        ub.add("response_time", iResponseInSeconds);
                        ub.ExecuteSql();




                        if (iSeconds > iMaxSeconds) iMaxSeconds = iSeconds;
                        if (iSeconds < iMinSeconds) iMinSeconds = iSeconds;

                        ++i;
                    }
                } catch (Exception eee)
                {
                    eee = eee;
                }


            }
        } catch (Exception e)
        {
            e = e;
        } finally
        {
            conn.Close();
        }

        return returnList;
    }