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); }
internal DataTable UsuarioObtenerXTipo(int usti_id, int site_id) { //string query = "[dbo].[CARGA_TODO_USUARIO] @USTI_ID = " + usti_id; //if (site_id != 0) // query += ", @SITE_ID = " + site_id; //return accesoDatos.dsCargarSqlQuery(query).Tables[0]; SqlAccesoDatos accesoDatos; accesoDatos = null; accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[CARGA_TODO_USUARIO]"); if (usti_id != 0) { accesoDatos.AgregarSqlParametro("@USTI_ID", usti_id); } if (site_id != 0) { accesoDatos.AgregarSqlParametro("@site_id", site_id); } return(accesoDatos.EjecutarSqlquery2()); } catch (Exception ex) { throw ex; } }
internal DataTable Reporte_SolicitudesDescarga(DateTime desde, DateTime hasta, string placa, int site_id, int play_id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_SOLICITUDES_DESCARGA]"); if (desde > DateTime.MinValue) { accesoDatos.AgregarSqlParametro("@DESDE", desde); } if (hasta > DateTime.MinValue) { accesoDatos.AgregarSqlParametro("@HASTA", hasta); } if (!string.IsNullOrEmpty(placa)) { accesoDatos.AgregarSqlParametro("@PLACA", placa); } if (site_id != 0) { accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); } if (play_id != 0) { accesoDatos.AgregarSqlParametro("@PLAY_ID", play_id); } return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_SalidaLoAguirre(DateTime desde, DateTime hasta) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_SALIDA_LO_AGUIRRE]"); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtener_motivotipoCarga(string id_tipo_carga, string descripcion) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_Motivos_TIPO_CARGA_X_CRITERIO]"); accesoDatos.AgregarSqlParametro("@id_tipo_carga", id_tipo_carga); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenerlugares_X_playa(int ID_PLAYA, string descripcion, string ocupado) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_LUGARES_X_CRITERIOXplaya]"); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); accesoDatos.AgregarSqlParametro("@playa_ID", ID_PLAYA); accesoDatos.AgregarSqlParametro("@OCUPADO", ocupado); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenersubPlayas_X_SITe(int ID_SITE, string descripcion, int VIRTUAL) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_subPLAYAS_X_CRITERIO_site]"); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); accesoDatos.AgregarSqlParametro("@id_site", ID_SITE); accesoDatos.AgregarSqlParametro("@VIRTUAL", VIRTUAL); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_OttawaXMov(DateTime desde, DateTime hasta, string site) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_OTTAWA_X_MOV]"); accesoDatos.AgregarSqlParametro("@FH_INICIO", desde); accesoDatos.AgregarSqlParametro("@FH_FIN", hasta); accesoDatos.AgregarSqlParametro("@id_site", site); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Historia_bloqueos(DateTime desde, DateTime hasta) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_HISTORIA_BLOQUEOS]"); accesoDatos.AgregarSqlParametro("@FH_INICIO", desde); accesoDatos.AgregarSqlParametro("@FH_FIN", hasta); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenerPlayas_X_Zona(int zona, string descripcion, int VIRTUAL) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("YMS_ConnectionString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_PLAYAS_X_CRITERIO]"); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); accesoDatos.AgregarSqlParametro("@ZONA_ID", zona); accesoDatos.AgregarSqlParametro("@VIRTUAL", VIRTUAL); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_KPIHist(int site_id, DateTime desde, DateTime hasta) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_KPI_SITE_HIST]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_Movimientos(int site_id, DateTime desde, DateTime hasta, bool no_ottawa) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_MOVIMIENTOS]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); accesoDatos.AgregarSqlParametro("@no_ottawa", no_ottawa); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenerZonas(int ID_SITE, string descripcion, string tipo_zona) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_TODO_ZONA]"); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); accesoDatos.AgregarSqlParametro("@SITE_ID", ID_SITE); accesoDatos.AgregarSqlParametro("@ZOTI_ID", tipo_zona); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_TrailerUltEstado(int site_id, int trai_id, DateTime desde, DateTime hasta) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_TRAILER_ULT_ESTADO]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@TRAI_ID", trai_id); accesoDatos.AgregarSqlParametro("@FH_DESDE", desde); accesoDatos.AgregarSqlParametro("@FH_HASTA", hasta); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_IngresosDescarga(int site_id, int tipo, DateTime desde, DateTime hasta) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_INGRESO]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); accesoDatos.AgregarSqlParametro("@TIIC_ID", tipo); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_yardtag_ult_dato(int site_id, DateTime desde, DateTime hasta, string placa, string playa) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_yardtag_ult_dato]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); accesoDatos.AgregarSqlParametro("@placa", placa); accesoDatos.AgregarSqlParametro("@id_playa", playa); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_SolicitudesCarga(int site_id, DateTime desde, DateTime hasta, int estado) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_SOLICITUDES_CARGA]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); if (estado != 0) { accesoDatos.AgregarSqlParametro("@id_estado", estado); } return(accesoDatos.EjecutarSqlquery2()); }
public String obtenerIdsPaginasPorPerfil(int idPerfil) { String ids = ""; SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[LISTAR_IDS_PAGINAS_TIPO_USUARIO]"); accesoDatos.AgregarSqlParametro("@TIPO_USUARIO", idPerfil); accesoDatos.EjecutarSqlLector(); int columnas = accesoDatos.SqlLectorDatos.FieldCount; while (accesoDatos.SqlLectorDatos.Read()) { ids = accesoDatos.SqlLectorDatos["IDS"].ToString(); } } catch (Exception ex) { throw (ex); } finally { accesoDatos.CerrarSqlConeccion(); } return(ids); }
internal UsuarioBC UsuarioObtenerPorId(int id) { UsuarioBC usuario = new UsuarioBC(); SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[CARGA_TODO_USUARIO]"); accesoDatos.AgregarSqlParametro("@USUA_ID", id); accesoDatos.EjecutarSqlLector(); while (accesoDatos.SqlLectorDatos.Read()) { usuario = cargarDatosUsuario(accesoDatos.SqlLectorDatos); } } catch (Exception ex) { throw (ex); } finally { accesoDatos.CerrarSqlConeccion(); } return(usuario); }
internal DataTable Reporte_KPI(int site_id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_KPI_SITE]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenersite(int id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_SITE_X_ID]"); accesoDatos.AgregarSqlParametro("@ID", id); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenersites(int id_user) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_SITES_X_CRITERIO]"); accesoDatos.AgregarSqlParametro("@id_usuario", id_user); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_CargaPreingresoXId(int id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[CARGA_PREINGRESO_V2]"); accesoDatos.AgregarSqlParametro("@ID", id); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenermenu_lugar(int id_lugar) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_menu_lugar]"); accesoDatos.AgregarSqlParametro("@lugar_id", id_lugar); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_SolicitudesCargaDetalle(int soli_id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_SOLICITUDES_CARGA_DETALLE]"); accesoDatos.AgregarSqlParametro("@SOLI_ID", soli_id); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenerZonasTipoCarga(int ID_SITE, string descripcion, string tipo_zona, int tipo_carga, int playa_tipo) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_TODO_ZONA_TIPO_CARGA]"); accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); if (tipo_carga != 0) { accesoDatos.AgregarSqlParametro("@tipo_carga", tipo_carga); } else { accesoDatos.AgregarSqlParametro("@tipo_carga", DBNull.Value); } if (playa_tipo != 0) { accesoDatos.AgregarSqlParametro("@pyti_id", playa_tipo); } accesoDatos.AgregarSqlParametro("@SITE_ID", ID_SITE); accesoDatos.AgregarSqlParametro("@ZOTI_ID", tipo_zona); accesoDatos.AgregarSqlParametro("@ZOTI_igual", "1"); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable Reporte_Devoluciones(DateTime desde, DateTime hasta, int prov_id, int soli_id, string placa, string nro_flota, int site_id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_DEVOLUCIONES]"); if (desde > DateTime.MinValue) { accesoDatos.AgregarSqlParametro("@DESDE", desde); } if (hasta > DateTime.MinValue) { accesoDatos.AgregarSqlParametro("@HASTA", hasta); } if (prov_id > 0) { accesoDatos.AgregarSqlParametro("@PROV_ID", prov_id); } if (soli_id > 0) { accesoDatos.AgregarSqlParametro("@SOLI_ID", soli_id); } if (site_id > 0) { accesoDatos.AgregarSqlParametro("@site_id", site_id); } if (!string.IsNullOrEmpty(placa)) { accesoDatos.AgregarSqlParametro("@PLACA", placa); } if (!string.IsNullOrEmpty(nro_flota)) { accesoDatos.AgregarSqlParametro("@NRO_FLOTA", nro_flota); } return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable obtenerZonasDescarga(int ID_SITE) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_ZONAS_DESCARGA]"); accesoDatos.AgregarSqlParametro("@ID_SITE", ID_SITE); return(accesoDatos.EjecutarSqlquery2()); }
internal DataTable LoguearUsuario(string username, string password) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[LOGIN_USUARIO]"); accesoDatos.AgregarSqlParametro("@USERNAME", username); accesoDatos.AgregarSqlParametro("@PASSWORD", password); return(accesoDatos.EjecutarSqlquery2()); } catch (Exception ex) { throw ex; } // return accesoDatos.dsCargarSqlQuery("[dbo].[LOGIN_USUARIO] @USERNAME = '******', @PASSWORD = '******'").Tables[0]; }
internal DataTable obtener_tipoCarga(string descripcion, bool preentrada, bool entrada) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[CARGA_TIPOS_INGRESO_CARGA_X_CRITERIO_v2]"); if (!string.IsNullOrEmpty(descripcion)) { accesoDatos.AgregarSqlParametro("@DESCRIPCION", descripcion); } if (preentrada) { accesoDatos.AgregarSqlParametro("@espreentrada", preentrada); } if (entrada) { accesoDatos.AgregarSqlParametro("@esentrada", entrada); } return(accesoDatos.EjecutarSqlquery2()); }