Exemple #1
0
        public DataSet obtenerNumDua()
        {
            //obtenerNumDua
            // String numDua;
            //  int ultimoValorDua;
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();

            DataSet dt = new DataSet();

            command.CommandText = "obtenerNumDua";

            command.CommandType = System.Data.CommandType.StoredProcedure;
            command.Parameters.Clear();

            command.Connection.Open();
            try
            {
                SqlDataAdapter daCMRegimen = new SqlDataAdapter(command);
                daCMRegimen.Fill(dt);
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #2
0
        public DataTable obtenerTransporte()
        {
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();

            DataTable dt = new DataTable();

            //  String consulta = "select * from catalogoModalidadRegimen;";
            command.CommandText = "obtenerCatTransporte";
            //"obtenerCMRegimen";
            //string consuta =
            command.CommandType = System.Data.CommandType.StoredProcedure;
            command.Parameters.Clear();
            // command.Parameters.Add(new SqlParameter(" @descripcion",descripcion));

            command.Connection.Open();
            try
            {
                SqlDataAdapter daCMRegimen = new SqlDataAdapter(command);
                daCMRegimen.Fill(dt);
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #3
0
        // public ScDUAInicial insertarDua(Int16 numerDua, Int16 idM, Int16 idRegimen, Int16 idtransp, Int16 idAduan, string tipoIdentif, string sumaCantidadBultos)
        public void insertarDua(DateTime fecha, int ango, int modalidad, int numDua, int regimen, int aduana, int aduanaIngresoDestino,
                                int tipoIdent, string numIdent, char tipoIdentificador, int numeroIdentificante,
                                int IdTransporte, string cantBultos, string validacion, int pesBru, int pesoNeto, decimal cambioDolar, int monedasColones, int impuesto)
        {
            // string valor = "hola";
            char       estado  = 'd';
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();

            try
            {
                ScDUAInicial dua = new ScDUAInicial();
                command.CommandText = "insertarDuaI";
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.Parameters.Clear();
                command.Parameters.Add(new SqlParameter("@fecha", fecha));  //

                command.Parameters.Add(new SqlParameter("@ango", ango));
                command.Parameters.Add(new SqlParameter("@modalidad", modalidad));
                command.Parameters.Add(new SqlParameter("@numDua", numDua));
                command.Parameters.Add(new SqlParameter("@regimen", regimen));
                command.Parameters.Add(new SqlParameter("@aduana", aduana));
                command.Parameters.Add(new SqlParameter("@aduanaIngresoDestino", aduanaIngresoDestino));
                command.Parameters.Add(new SqlParameter("@tipoIdentif", tipoIdent));
                command.Parameters.Add(new SqlParameter("@numIdent", numIdent));
                command.Parameters.Add(new SqlParameter("@tipoIdentificador", tipoIdentificador));
                command.Parameters.Add(new SqlParameter("@numeroIdentificante", numeroIdentificante));
                command.Parameters.Add(new SqlParameter("@IdTransporte", IdTransporte));
                command.Parameters.Add(new SqlParameter("@cantBultos", cantBultos));
                command.Parameters.Add(new SqlParameter("@validacion", validacion));
                command.Parameters.Add(new SqlParameter("@pesoBru", pesBru));
                command.Parameters.Add(new SqlParameter("@pesoNeto", pesoNeto));
                command.Parameters.Add(new SqlParameter("@cambDolar", cambioDolar));
                command.Parameters.Add(new SqlParameter("@monedasColones", monedasColones));
                command.Parameters.Add(new SqlParameter("@impuesto", impuesto));
                command.Parameters.Add(new SqlParameter("@estado", estado));
                command.Connection.Open();
                SqlDataReader RESULTADO = ((SqlDataReader)command.ExecuteReader());

                /* if (RESULTADO.Read())
                 * {
                 *   empleado.Clave = clave;
                 *   empleado.NombreEmpleado = nombre;
                 *   empleado.IdEmpleado = Convert.ToInt16(RESULTADO["IdEmpleado"]);
                 *   empleado.CorreoEmpleado = RESULTADO["NombreEmpleado"].ToString();
                 * }*/
                // return dua;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #4
0
        public DataTable obtenerPuerto()
        {
            // String descripcion = "Despacho";
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();


            DataTable dt = new DataTable();

            command.CommandText = "paObtenerPuertos";
            command.CommandType = System.Data.CommandType.StoredProcedure;
            command.Parameters.Clear();
            command.Connection.Open();
            try
            {
                SqlDataAdapter daCMRegimen = new SqlDataAdapter(command);
                daCMRegimen.Fill(dt);
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #5
0
        ///
        #region insertarDuaInicial

        /* public ScDUAInicial insertarDua()
         * {
         *  SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();
         *  try
         *  {
         *      ScDUAInicial duaInicial = new ScDUAInicial();
         *      command.CommandText = "paValidarEmpleado";
         *      command.CommandType = System.Data.CommandType.StoredProcedure;
         *      command.Parameters.Clear();
         *      command.Parameters.Add(new SqlParameter("@nombreEmpleado", ScAngoDua));
         *      command.Parameters.Add(new SqlParameter("@Clave", clave));
         *      command.Connection.Open();
         *      SqlDataReader RESULTADO = ((SqlDataReader)command.ExecuteReader());
         *      if (RESULTADO.Read())
         *      {
         *          duaInicial.Clave = clave;
         *          duaInicial.NombreEmpleado = nombre;
         *          duaInicial.IdEmpleado = Convert.ToInt16(RESULTADO["IdEmpleado"]);
         *          duaInicial.CorreoEmpleado = RESULTADO["NombreEmpleado"].ToString();
         *      }
         *      return empleado;
         *  }
         *  catch (Exception ex)
         *  {
         *      throw ex;
         *  }
         *  finally
         *  {
         *      if (command.Connection.State == System.Data.ConnectionState.Open)
         *      {
         *          command.Connection.Close();
         *      }
         *      command.Dispose();
         *  }
         * }
         #endregion
         *
         *
         */
        public void insertarClientes(ScDUAInicial dua)
        {
            SqlTransaction trans1 = null;

            // SqlCommand comandoSQL = null;
            // SqlConnection conectar = null;
            SqlCommand comandoSQL = ClsConexion.GET_CONEXION().CreateCommand();

            try
            {
                // conectar = Conexion.GetConexion();
                // conectar.Open();
                // comandoSQL = conectar.CreateCommand();
                //trans1 = conectar.BeginTransaction();

                comandoSQL.CommandText = "pa_insertarClientes";

                comandoSQL.CommandType = System.Data.CommandType.StoredProcedure;
                //asociar comando a la transacción
                comandoSQL.Transaction = trans1;
                //  comandoSQL.Connection = conectar;

                //limpiar parámetros
                comandoSQL.Parameters.Clear();

                comandoSQL.Parameters.Add(new SqlParameter("@nombre", dua.ScAngoDua));
                comandoSQL.Parameters.Add(new SqlParameter("@apellido", dua.ScModalidad));
                comandoSQL.Parameters.Add(new SqlParameter("@genero", dua.ScIdAduana));

                comandoSQL.ExecuteNonQuery();

                trans1.Commit();
                //MessageBox.Show("Se ha insertado correctamente el cliente " + dua.nombre + dua.apellido);
                //   return true;
            }
            catch (Exception ex)
            {
                //confirmar negativamente transaccion
                trans1.Rollback();
                throw ex;
            }
            finally
            {
            }
        }
Exemple #6
0
        // SqlCommand comandoSQL;
        #region Guardar Boleta
        public static Boolean GuardarBoleta(EntBoleta entBoleta)
        {
            //SqlConnection conectar = new SqlConnection(ADConexion.ConexionR2()); conectar.Open();
            SqlCommand comandoSQL = ClsConexion.GET_CONEXION().CreateCommand();

            //  comando  SqlCommand comandoSQL = new SqlCommand();
            comandoSQL.CommandText = "paInsertarBoletaDetalle";
            comandoSQL.CommandType = System.Data.CommandType.StoredProcedure;
            // comandoSQL.Connection = conectar;
            try { comandoSQL.Parameters.Clear();
                  DataTable dtTipoDetalle = new DataTable();
                  dtTipoDetalle.Columns.Add("id_boleta", typeof(int));
                  dtTipoDetalle.Columns.Add("num_linea", typeof(int));
                  dtTipoDetalle.Columns.Add("detalle", typeof(string));
                  foreach (EntDetalle objDetalle in entBoleta.listDetalle)
                  {
                      DataRow dr = dtTipoDetalle.NewRow();
                      dr["id_boleta"] = objDetalle.id_boleta;
                      dr["num_linea"] = objDetalle.numLinea;
                      dr["detalle"]   = objDetalle.detalle;
                      dtTipoDetalle.Rows.Add(dr);
                  }
                  comandoSQL.Parameters.Add(new SqlParameter("@listatipoDetalle", dtTipoDetalle));
                  comandoSQL.Parameters.Add(new SqlParameter("@id_boleta", entBoleta.id_boleta));
                  comandoSQL.Parameters.Add(new SqlParameter("@descri_boleta", entBoleta.desc_boleta));
                  comandoSQL.ExecuteNonQuery(); return(true); }
            catch (Exception ex) { throw ex; }
            finally
            {
                if (comandoSQL.Connection.State == System.Data.ConnectionState.Open)
                {
                    comandoSQL.Connection.Close();
                }
                comandoSQL.Dispose();
            }
        }
Exemple #7
0
        public ClsEmpleado ValidarUsuario(string clave, string nombre)
        {
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();

            try
            {
                ClsEmpleado empleado = new ClsEmpleado();
                command.CommandText = "paValidarEmpleado";
                command.CommandType = System.Data.CommandType.StoredProcedure;
                command.Parameters.Clear();
                command.Parameters.Add(new SqlParameter("@nombreEmpleado", nombre));
                command.Parameters.Add(new SqlParameter("@Clave", clave));
                command.Connection.Open();
                SqlDataReader RESULTADO = ((SqlDataReader)command.ExecuteReader());
                if (RESULTADO.Read())
                {
                    empleado.Clave          = clave;
                    empleado.NombreEmpleado = nombre;
                    empleado.IdEmpleado     = Convert.ToInt16(RESULTADO["IdEmpleado"]);
                    empleado.CorreoEmpleado = RESULTADO["NombreEmpleado"].ToString();
                }
                return(empleado);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #8
0
        public DataSet insertarDua()
        {
            SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();

            /* try
             * {
             *  string num = "";
             *   command.CommandText = "insertarUltimoNumDua";
             *           command.CommandType = System.Data.CommandType.StoredProcedure;
             *           command.Connection.Open();
             *          // num = command.CommandType();
             *   return num;
             * }
             * catch (Exception ex)
             * {
             *   throw ex;
             * }
             * finally
             * {
             *   if (command.Connection.State == System.Data.ConnectionState.Open)
             *   {
             *       command.Connection.Close();
             *   }
             *   command.Dispose();
             * }*/



            //    String query = "select top 1((ScNumeroDua)+1)from ScDUAInicial order by [ScNumeroDua] desc;";

            /* public DataTable obtenerAduana()
             * {
             *
             *   SqlCommand command = ClsConexion.GET_CONEXION().CreateCommand();
             */
            DataSet dt = new DataSet();

            //  String consulta = "select * from catalogoModalidadRegimen;";
            command.CommandText = "insertarUltimoNumDua";
            //"obtenerCMRegimen";
            //string consuta =
            command.CommandType = System.Data.CommandType.StoredProcedure;
            command.Parameters.Clear();
            // command.Parameters.Add(new SqlParameter(" @descripcion",descripcion));

            command.Connection.Open();
            try
            {
                SqlDataAdapter daCMRegimen = new SqlDataAdapter(command);
                daCMRegimen.Fill(dt);
                // string num = Convert.ToString(dt).ToString();
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (command.Connection.State == System.Data.ConnectionState.Open)
                {
                    command.Connection.Close();
                }
                command.Dispose();
            }
        }
Exemple #9
0
        public static Boolean guardarDetalle(ScDUAInicial duaInicial)
        {
//   SqlConnection conectar = new data().SQL();

//comando
            SqlCommand comandoSQL = ClsConexion.GET_CONEXION().CreateCommand();

            // SqlCommand comandoSQL = new SqlCommand();
            // conectar.Open();
            //comandoSQL.CommandText = "paInsertarDetalle";
            comandoSQL.CommandText = "paInsertarActualizarDUAInicialyDetalle";
            comandoSQL.CommandType = System.Data.CommandType.StoredProcedure;
// comandoSQL.Connection = conectar;

            try
            {
                comandoSQL.Parameters.Clear();
                DataTable dtTipoDetalle = new DataTable();
                dtTipoDetalle.Columns.Add("ScFechaDua", typeof(DateTime));
                dtTipoDetalle.Columns.Add("ScAngoDua", typeof(Int32));

                dtTipoDetalle.Columns.Add("ScNumeroDua", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScModalidad", typeof(Int32));
                // dtTipoDetalle.Columns.Add("ScIdRegimen", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScIdAduana", typeof(Int32));

                /* dtTipoDetalle.Columns.Add("ScIdAduanaIngresoDestino", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScTipoIdentificacion", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScNumeroIdentificacion", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScTipoIdentificadorDeclarante", typeof(char));
                 * dtTipoDetalle.Columns.Add("ScNumeroIdentificacionDeclarante", typeof(string));
                 * dtTipoDetalle.Columns.Add("ScIdTransporte", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScSumatoriaCantidadBultos", typeof(string));
                 * dtTipoDetalle.Columns.Add("ScValidacionValorAduanero", typeof(string));
                 * dtTipoDetalle.Columns.Add("ScTotalPesoBruto", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScTotalPesoNeto", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScTipoCambioDolar", typeof(decimal));
                 * dtTipoDetalle.Columns.Add("ScTotalMonedasColones", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScImpuestoTotal", typeof(Int32));
                 * dtTipoDetalle.Columns.Add("ScEstado", typeof(string));*/

                ///------------------------------------
                dtTipoDetalle.Columns.Add("ScNombreConsignatorio", typeof(string));
                dtTipoDetalle.Columns.Add("ScIdPaisOrigen", typeof(string));
                dtTipoDetalle.Columns.Add("ScPaisDestino", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScPaisPuertoEmbarque", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScPuertoArribo", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScPuertoSalida", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScNumLinea", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScCantidadBultos", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScCantidadUnidades", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScDescriProductoResumido", typeof(string));
                dtTipoDetalle.Columns.Add("ScDescriProductoDetallado", typeof(string));
                dtTipoDetalle.Columns.Add("ScIdPartidaArancel", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScValorSeguro", typeof(decimal));
                dtTipoDetalle.Columns.Add("ScValorFlete", typeof(decimal));
                dtTipoDetalle.Columns.Add("ScValorOtros", typeof(decimal));
                dtTipoDetalle.Columns.Add("ScValorFactura", typeof(decimal));
                dtTipoDetalle.Columns.Add("ScValorAduaneroCIF_FOB", typeof(string));
                dtTipoDetalle.Columns.Add("ScValorSeguroPesoBruto", typeof(int));
                dtTipoDetalle.Columns.Add("ScPesoNeto", typeof(int));
                dtTipoDetalle.Columns.Add("ScIdMoneda", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScTratadoConvenioInternacional", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoDAI", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoSelectivoConsumo", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoLey6946", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoIDA", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoIFAM", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoLey7922", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoLey8114", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoForestal", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoCaldera", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoVentas", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoSalvaguarda", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScImpuestoGofito", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScCodigoExoneracion", typeof(Int32));
                dtTipoDetalle.Columns.Add("ScExoneracionDAI", typeof(string));
                dtTipoDetalle.Columns.Add("ScExoneracionSelectivoConsumo", typeof(string));
                dtTipoDetalle.Columns.Add("ScExoneracionVentas", typeof(string));
                dtTipoDetalle.Columns.Add("ScIdCondicionEntrega", typeof(string));
                dtTipoDetalle.Columns.Add("ScIdPaisAdquisicion", typeof(string));



                foreach (detalleDua objDetalle in duaInicial.listaDetalleDua)
                {
                    DataRow dr = dtTipoDetalle.NewRow();
                    dr["ScFechaDua"]  = objDetalle.ScFechaDua;
                    dr["ScAngoDua"]   = objDetalle.ScAngoDua;
                    dr["ScNumeroDua"] = objDetalle.ScNumeroDua;

                    dr["ScModalidad"]                    = objDetalle.ScModalidad;
                    dr["ScIdAduana"]                     = objDetalle.ScIdAduana;
                    dr["ScNombreConsignatorio"]          = objDetalle.ScNombreConsignatorio;
                    dr["ScIdPaisOrigen"]                 = objDetalle.ScIdPaisOrigen;
                    dr["ScPaisDestino"]                  = objDetalle.ScPaisDestino;
                    dr["ScPaisPuertoEmbarque"]           = objDetalle.ScPaisPuertoEmbarque;
                    dr["ScPuertoArribo"]                 = objDetalle.ScPuertoArribo;
                    dr["ScPuertoSalida"]                 = objDetalle.ScPuertoSalida;
                    dr["ScNumLinea"]                     = objDetalle.ScNumLinea;
                    dr["ScCantidadBultos"]               = objDetalle.ScCantidadBultos;
                    dr["ScCantidadUnidades"]             = objDetalle.ScCantidadUnidades;
                    dr["ScDescriProductoResumido"]       = objDetalle.ScDescriProductoResumido;
                    dr["ScDescriProductoDetallado"]      = objDetalle.ScDescriProductoDetallado;
                    dr["ScIdPartidaArancel"]             = objDetalle.ScIdPartidaArancel;
                    dr["ScValorSeguro"]                  = objDetalle.ScValorSeguro;
                    dr["ScValorFlete"]                   = objDetalle.ScValorFlete;
                    dr["ScValorOtros"]                   = objDetalle.ScValorOtros;
                    dr["ScValorFactura"]                 = objDetalle.ScValorFactura;
                    dr["ScValorAduaneroCIF_FOB"]         = objDetalle.ScValorAduaneroCIF_FOB;
                    dr["ScValorSeguroPesoBruto"]         = objDetalle.ScValorSeguroPesoBruto;
                    dr["ScPesoNeto"]                     = objDetalle.ScPesoNeto;
                    dr["ScIdMoneda"]                     = objDetalle.ScIdMoneda;
                    dr["ScTratadoConvenioInternacional"] = objDetalle.ScTratadoConvenioInternacional;
                    dr["ScImpuestoDAI"]                  = objDetalle.ScImpuestoDAI;
                    dr["ScImpuestoSelectivoConsumo"]     = objDetalle.ScImpuestoSelectivoConsumo;
                    dr["ScImpuestoLey6946"]              = objDetalle.ScImpuestoLey6946;
                    dr["ScImpuestoIDA"]                  = objDetalle.ScImpuestoIDA;
                    dr["ScImpuestoIFAM"]                 = objDetalle.ScImpuestoIFAM;
                    dr["ScImpuestoLey7922"]              = objDetalle.ScImpuestoLey7922;
                    dr["ScImpuestoLey8114"]              = objDetalle.ScImpuestoLey8114;
                    dr["ScImpuestoForestal"]             = objDetalle.ScImpuestoForestal;
                    dr["ScImpuestoCaldera"]              = objDetalle.ScImpuestoCaldera;
                    dr["ScImpuestoVentas"]               = objDetalle.ScImpuestoVentas;
                    dr["ScImpuestoSalvaguarda"]          = objDetalle.ScImpuestoSalvaguarda;
                    dr["ScImpuestoGofito"]               = objDetalle.ScImpuestoGofito;
                    dr["ScCodigoExoneracion"]            = objDetalle.ScCodigoExoneracion;
                    dr["ScExoneracionDAI"]               = objDetalle.ScExoneracionDAI;
                    dr["ScExoneracionSelectivoConsumo"]  = objDetalle.ScExoneracionSelectivoConsumo;
                    dr["ScExoneracionVentas"]            = objDetalle.ScExoneracionVentas;
                    dr["ScIdCondicionEntrega"]           = objDetalle.ScIdCondicionEntrega;
                    dr["ScIdPaisAdquisicion"]            = objDetalle.ScIdPaisAdquisicion;
                    dtTipoDetalle.Rows.Add(dr);
                }
                comandoSQL.Parameters.Add(new SqlParameter("@listadetalleD", dtTipoDetalle));

                comandoSQL.Parameters.Add(new SqlParameter("@fecha", duaInicial.ScFechaDua));
                comandoSQL.Parameters.Add(new SqlParameter("@ango", duaInicial.ScAngoDua));
                comandoSQL.Parameters.Add(new SqlParameter("@modalidad", duaInicial.ScModalidad));
                comandoSQL.Parameters.Add(new SqlParameter("@numDua", duaInicial.ScNumeroDua));


                comandoSQL.Parameters.Add(new SqlParameter("@regimen", duaInicial.ScIdRegimen));

                comandoSQL.Parameters.Add(new SqlParameter("@aduana", duaInicial.ScIdAduana));
                comandoSQL.Parameters.Add(new SqlParameter("@aduanaIngresoDestino", duaInicial.ScIdAduanaIngresoDestino));

                comandoSQL.Parameters.Add(new SqlParameter("@tipoIdentif", duaInicial.ScTipoIdentificacion));
                comandoSQL.Parameters.Add(new SqlParameter("@numIdent", duaInicial.ScNumeroIdentificacion));
                comandoSQL.Parameters.Add(new SqlParameter("@tipoIdentificador", duaInicial.ScTipoIdentificacion));
                comandoSQL.Parameters.Add(new SqlParameter("@numeroIdentificante", duaInicial.ScNumeroIdentificacionDeclarante));
                comandoSQL.Parameters.Add(new SqlParameter("@IdTransporte", duaInicial.ScIdTransporte));
                comandoSQL.Parameters.Add(new SqlParameter("@cantBultos", duaInicial.ScSumatoriaCantidadBultos));
                comandoSQL.Parameters.Add(new SqlParameter("@validacion", duaInicial.ScValidacionValorAduanero));
                comandoSQL.Parameters.Add(new SqlParameter("@pesoBru", duaInicial.ScTotalPesoBruto));
                comandoSQL.Parameters.Add(new SqlParameter("@pesoNeto", duaInicial.ScTotalPesoNeto));
                comandoSQL.Parameters.Add(new SqlParameter("@cambDolar", duaInicial.ScTipoCambioDolar));
                comandoSQL.Parameters.Add(new SqlParameter("@monedasColones", duaInicial.ScTotalMonedasColones));
                comandoSQL.Parameters.Add(new SqlParameter("@impuesto", duaInicial.ScImpuestoTotal));
                comandoSQL.Parameters.Add(new SqlParameter("@estado", duaInicial.ScEstado));



                comandoSQL.Connection.Open();
                comandoSQL.ExecuteNonQuery();
                return(true);
            }
            catch (Exception ex)
            {
                Console.Write("ERROR: " + ex.Message);
                return(false);
            }
            finally
            {
                //Cerrar conexión
                if (comandoSQL.Connection.State == System.Data.ConnectionState.Open)
                {
                    comandoSQL.Connection.Close();
                }

                comandoSQL = null;
            }
        }