internal bool UsuarioModificarPass(UsuarioBC usuario) { bool esExitosa = false; SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[ACTUALIZA_PASS_USUARIO]"); accesoDatos.AgregarSqlParametro("@ID", usuario.ID); accesoDatos.AgregarSqlParametro("@PASS", usuario.PASSWORD); accesoDatos.EjecutarSqlEscritura(); esExitosa = true; } catch (Exception ex) { esExitosa = false; throw ex; } return(esExitosa); }
internal Boolean visibleasignartrailer(int id_site, int id_usuario) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos("CsString"); accesoDatos.CargarSqlComando("[dbo].[visible_asignar_trailer]"); accesoDatos.AgregarSqlParametro("@id_site", id_site); accesoDatos.AgregarSqlParametro("@id_usuario", id_usuario); string resultado = accesoDatos.EjecutarSqlquery2().Rows[0][0].ToString(); // int resultado = 1; switch (resultado) { case "False": return(false); case "True": return(true); default: throw new InvalidOperationException("Integer value is not valid"); } }
internal bool UsuarioActivar(int id) { bool esExitosa = false; SqlAccesoDatos accesoDatos; accesoDatos = null; accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[ACTIVA_USUARIO]"); accesoDatos.AgregarSqlParametro("@ID", id); accesoDatos.EjecutarSqlEscritura(); esExitosa = true; } catch (Exception ex) { esExitosa = false; throw ex; } return(esExitosa); }
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(); } }
internal bool UsuarioAsignarLugares(int usua_id, string luga_id) { bool esExitosa = false; SqlAccesoDatos accesoDatos; accesoDatos = null; accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); try { accesoDatos.CargarSqlComando("[dbo].[AGREGA_LUGARES_ESPECIALES_USUARIO]"); accesoDatos.AgregarSqlParametro("@USUA_ID", usua_id); accesoDatos.AgregarSqlParametro("@LUGA_ID", luga_id); accesoDatos.EjecutarSqlEscritura(); esExitosa = true; } catch (Exception ex) { esExitosa = false; throw ex; } return(esExitosa); }
internal DataTable Reporte_Entradaysalida(int site_id, DateTime desde, DateTime hasta, String trai_placa, string rut_conductor, int id_transportista) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); accesoDatos.CargarSqlComando("[dbo].[REPORTE_ENTRADA_Salida_V2]"); accesoDatos.AgregarSqlParametro("@SITE_ID", site_id); accesoDatos.AgregarSqlParametro("@DESDE", desde); accesoDatos.AgregarSqlParametro("@HASTA", hasta); if (!string.IsNullOrEmpty(trai_placa)) { accesoDatos.AgregarSqlParametro("@PLACA", trai_placa); } if (!string.IsNullOrEmpty(rut_conductor)) { accesoDatos.AgregarSqlParametro("@rut_conductor", rut_conductor); } if (id_transportista != 0) { accesoDatos.AgregarSqlParametro("@id_transportista", id_transportista); } return(accesoDatos.EjecutarSqlquery2()); }
public DataTable obtenerTodas() { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_MENU] ").Tables[0]); }
public DataTable obtenerPaginasMenu(int OrdenEncabezado) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_PAGINAS_MENU] " + OrdenEncabezado).Tables[0]); }
public DataTable obtenerEncabezadosMenu() { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); return(accesoDatos.dsCargarSqlQuery("[dbo].[LISTAR_ENCABEZADOS_PAGINAS_MENU] ").Tables[0]); }
internal DataTable UsuarioObtenerAsignados(int usua_id) { SqlAccesoDatos accesoDatos = new SqlAccesoDatos(SqlTransaccion.STRING_CONEXION); return(accesoDatos.dsCargarSqlQuery("[dbo].[CARGA_LUGARES_ASIGNADOS_SITE_USUARIO] " + usua_id).Tables[0]); }