Ejemplo n.º 1
0
        internal DataTable yardtag_cuadra_ObtenerTodos(string TRAI_PLACA, int play_id, int zona_id, int site_id)
        {
            DataTable      dt          = new DataTable();
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString");

            try
            {
                accesoDatos.CargarSqlComando("[dbo].[prcYARDTAG_EVENTOS_CUADRATURA_MANUAL_CONSULTAR]");

                accesoDatos.AgregarSqlParametro("@TRAI_PLACA", TRAI_PLACA);
                if (play_id != 0)
                {
                    accesoDatos.AgregarSqlParametro("@PLAY_ID", play_id);
                }
                if (zona_id != 0)
                {
                    accesoDatos.AgregarSqlParametro("@ZONA_ID", zona_id);
                }
                if (site_id != 0)
                {
                    accesoDatos.AgregarSqlParametro("@SITE_ID", site_id);
                }

                dt = accesoDatos.EjecutarSqlquery2();
            }
            catch (Exception)
            {
            }
            finally
            {
                accesoDatos.LimpiarSqlParametros();
                accesoDatos.CerrarSqlConeccion();
            }
            return(dt);
        }
Ejemplo n.º 2
0
        internal bool cuadra_yardtag(string YATA_COD, int YAHI_ID, int YAPE_ID, int LUGA_ID, int TRAI_ID, int usua_id, out string mensaje) //Solicitud Carga
        {
            bool exito = false;

            mensaje = "";
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString");

            accesoDatos.CargarSqlComando("[dbo].[prcYARDTAG_EVENTOS_CUADRATURA_MANUAL_CUADRAR]");
            accesoDatos.AgregarSqlParametro("@YATA_COD", YATA_COD);
            accesoDatos.AgregarSqlParametro("@YAHI_ID", YAHI_ID);
            accesoDatos.AgregarSqlParametro("@YAPE_ID", YAPE_ID);
            accesoDatos.AgregarSqlParametro("@LUGA_ID", LUGA_ID);
            accesoDatos.AgregarSqlParametro("@TRAI_ID", TRAI_ID);
            accesoDatos.AgregarSqlParametro("@usua_id", usua_id);
            //accesoDatos.AgregarSqlParametro("@RUTA", d.SOLICITUD_CARGA.RUTA);
            //accesoDatos.AgregarSqlParametro("@OBSERVACION", d.SOLICITUD_CARGA.OBSERVACION);
            //accesoDatos.AgregarSqlParametro("@ANDENES", ds.Tables["ANDENES"]);
            //accesoDatos.AgregarSqlParametro("@LOCALES", ds.Tables["LOCALES"]);
            //accesoDatos.AgregarSqlParametro("@USUA_ID", d.USUA_ID_CARGA);
            //if (d.SOLICITUD_CARGA.ID_SHORTECK != "0" && d.SOLICITUD_CARGA.ID_SHORTECK != "")
            //    accesoDatos.AgregarSqlParametro("@SHOR_ID", d.SOLICITUD_CARGA.ID_SHORTECK);
            accesoDatos.AgregarSqlParametroOUT("@ERROR", exito);
            SqlParameter param = accesoDatos.AgregarSqlParametro("@ERROR_MSG", mensaje);

            param.Direction = ParameterDirection.Output;
            param.Size      = 1000;
            try
            {
                accesoDatos.EjecutarSqlEscritura();
                mensaje = param.Value.ToString();
                exito   = true;
            }
            catch (Exception ex)
            {
                exito   = false;
                mensaje = ex.Message;
                //  throw (ex);
            }
            finally
            {
                accesoDatos.LimpiarSqlParametros();
                accesoDatos.CerrarSqlConeccion();
            }
            return(exito);
        }
Ejemplo n.º 3
0
        internal DataTable Reporte_TrailerGPS(bool externo, string placa, string numero, int tipo_id, int tran_id, int site_id)
        {
            SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION);

            accesoDatos.CargarSqlComando("[dbo].[REPORTE_TRAILER_GPS]");
            accesoDatos.AgregarSqlParametro("@TRAI_EXTERNO", externo);
            if (tipo_id != 0)
            {
                accesoDatos.AgregarSqlParametro("@TRTI_ID", tipo_id);
            }
            if (tran_id != 0)
            {
                accesoDatos.AgregarSqlParametro("@TRAN_ID", tran_id);
            }
            if (!String.IsNullOrEmpty(numero))
            {
                accesoDatos.AgregarSqlParametro("@TRAI_NRO", numero);
            }
            if (!String.IsNullOrEmpty(placa))
            {
                accesoDatos.AgregarSqlParametro("@TRAI_PLACA", placa);
            }
            if (site_id != 0)
            {
                accesoDatos.AgregarSqlParametro("@SITE_ID", site_id);
            }
            try
            {
                return(accesoDatos.EjecutarSqlquery2());
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                accesoDatos.LimpiarSqlParametros();
                accesoDatos.CerrarSqlConeccion();
            }
        }