Exemple #1
0
        public int InsertarRespuestaDocEnviadoReceptor(TributarioCr.ConsumidorApi.Validacion respuesta)
        {
            SqlConnection Conexion  = new SqlConnection(cadenaConexion);
            int           resultado = new int();

            try
            {
                using (Conexion)
                {
                    Conexion.Open();
                    SqlCommand command = new SqlCommand("Sp_InsertarRespuestaDocEnviadoReceptor", Conexion);
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@CLAVE", respuesta.Clave);
                    command.Parameters.AddWithValue("@FECHA", respuesta.Fecha);
                    command.Parameters.AddWithValue("@INDESTADO", respuesta.IndEstado);
                    command.Parameters.AddWithValue("@RESPUESTAXML", respuesta.RespuestaXml);
                    resultado = command.ExecuteNonQuery();
                    Conexion.Close();
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error en metodo InsertarRespuestaDocEnviadoReceptor", ex);
            }
            return(resultado);
        }
Exemple #2
0
 private void CallBackUrl(string jsonValidacion)
 {
     TributarioCr.ConsumidorApi.Validacion validacion = new TributarioCr.ConsumidorApi.Validacion();
     jsonValidacion = jsonValidacion.Replace("-", "");
     validacion     = JsonConvert.DeserializeObject <TributarioCr.ConsumidorApi.Validacion>(jsonValidacion);
     EngineDbSqlServer MetodoDb = new EngineDbSqlServer();
     int resultado = MetodoDb.InsertarRespuestaDocEnviadoReceptor(validacion);
 }