Пример #1
0
        public static DataSet SelectUsersSinCtaCte()
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("SelectUsersSinCtaCte");

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #2
0
        /// <summary>
        /// Selecciona todos los registros de la tabla TipoEstadia.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet  SelectAll()
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoEstadiaSelectAll");

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #3
0
        public static DataSet MisReservasSelectByIdReserva(int idReserva)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("MisReservasSelectByIdReserva");

            myDatabase.AddInParameter(myCommand, "@idReserva", DbType.Int32, idReserva);
            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #4
0
        public static DataSet SelectDisponibilidadDiario(DateTime fecha)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("PlazaSelectAllDiarioAvailable");

            myDatabase.AddInParameter(myCommand, "@fecha", DbType.Date, fecha);
            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #5
0
        /// <summary>
        /// Selecciona todos los registros de la tabla Reserva a través de una foreign key.
        /// </summary>
        /// <param name="idPlaza"></param>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet MisReservasSelectByIdUser(string id)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("MisReservasSelectByIdUser");

            myDatabase.AddInParameter(myCommand, "@UserId", DbType.String, id);
            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #6
0
        /// <summary>
        /// Actualiza registros de la tabla AspNetUsers.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="email"></param>
        /// <param name="emailConfirmed"></param>
        /// <param name="passwordHash"></param>
        /// <param name="securityStamp"></param>
        /// <param name="phoneNumber"></param>
        /// <param name="phoneNumberConfirmed"></param>
        /// <param name="twoFactorEnabled"></param>
        /// <param name="lockoutEndDateUtc"></param>
        /// <param name="lockoutEnabled"></param>
        /// <param name="accessFailedCount"></param>
        /// <param name="userName"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        ///


        public static void AspNetUsersUpdateEmailConfirmed(string id)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("AspNetUsersUpdateEmailConfirmed");

            myDatabase.AddInParameter(myCommand, "@Id", DbType.String, id);
            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #7
0
        /// <summary>
        /// Selecciona un registro desde la tabla OperacionesTC.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	27/11/2017 23:27:18
        /// </history>
        public static DataSet  Select(int idOperacion)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("OperacionesTCSelect");

            myDatabase.AddInParameter(myCommand, "@IdOperacion", DbType.Int32, idOperacion);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #8
0
        /// <summary>
        /// Selecciona un registro desde la tabla DatosPersonales.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet  Select(int nroReg)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("DatosPersonalesSelect");

            myDatabase.AddInParameter(myCommand, "@nroReg", DbType.Int32, nroReg);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #9
0
        /// <summary>
        /// Elimina un registro de la tabla DatosPersonales a través de una foreign key.
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void DeleteByIdUsr(string idUsr)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("DatosPersonalesDeleteByIdUsr");

            myDatabase.AddInParameter(myCommand, "@idUsr", DbType.String, idUsr);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #10
0
        /// <summary>
        /// Suprime un registro de la tabla DatosPersonales por una clave primaria(primary key).
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Delete(int nroReg)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("DatosPersonalesDelete");

            myDatabase.AddInParameter(myCommand, "@nroReg", DbType.Int32, nroReg);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #11
0
        /// <summary>
        /// Selecciona un registro desde la tabla TipoEstadia.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet  Select(int idTipoEstadia)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoEstadiaSelect");

            myDatabase.AddInParameter(myCommand, "@idTipoEstadia", DbType.Int32, idTipoEstadia);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #12
0
        public static void UpdateSaldo(int nroCuenta, decimal saldo)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("CuentaCorrienteUpdateSaldo");

            myDatabase.AddInParameter(myCommand, "@nroCuenta", DbType.Int32, nroCuenta);
            myDatabase.AddInParameter(myCommand, "@saldo", DbType.Decimal, saldo);
            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #13
0
        /// <summary>
        /// Selecciona un registro desde la tabla CuentaCorriente.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	25/11/2017 12:24:36
        /// </history>
        public static DataSet  Select(string idUsr)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("CuentaCorrienteSelect");

            myDatabase.AddInParameter(myCommand, "@idUsr", DbType.String, idUsr);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #14
0
        public static DataSet SelectByIdUser(string idUser)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("EstacionamientoSelectByIdUser");

            myDatabase.AddInParameter(myCommand, "@idUser", DbType.String, idUser);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #15
0
        /// <summary>
        /// Selecciona un registro desde la tabla AspNetRoles.
        /// </summary>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet  Select(string id)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("AspNetRolesSelect");

            myDatabase.AddInParameter(myCommand, "@Id", DbType.String, id);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #16
0
        /// <summary>
        /// Selecciona todos los registros de la tabla Estacionamiento a través de una foreign key.
        /// </summary>
        /// <param name="idBarrio"></param>
        /// <returns>DataSet</returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static DataSet  SelectByIdBarrio(int idBarrio)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("EstacionamientoSelectByIdBarrio");

            myDatabase.AddInParameter(myCommand, "@idBarrio", DbType.Int32, idBarrio);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #17
0
        /// <summary>
        /// Suprime un registro de la tabla TipoEstadia por una clave primaria(primary key).
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Delete(int idTipoEstadia)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoEstadiaDelete");

            myDatabase.AddInParameter(myCommand, "@idTipoEstadia", DbType.Int32, idTipoEstadia);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #18
0
        /// <summary>
        /// Elimina un registro de la tabla Tarifa a través de una foreign key.
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void DeleteByIdMedioPago(int idMedioPago)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TarifaDeleteByIdMedioPago");

            myDatabase.AddInParameter(myCommand, "@idMedioPago", DbType.Int32, idMedioPago);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #19
0
        /// <summary>
        /// Suprime un registro de la tabla AspNetRoles por una clave primaria(primary key).
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Delete(string id)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("AspNetRolesDelete");

            myDatabase.AddInParameter(myCommand, "@Id", DbType.String, id);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #20
0
        public static void ReservaUpdateCerrado(string idUser)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("ReservaUpdateCerrado");

            myDatabase.AddInParameter(myCommand, "@idUser", DbType.String, idUser);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #21
0
        /// <summary>
        /// Elimina un registro de la tabla Estacionamiento a través de una foreign key.
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void DeleteByIdBarrio(int idBarrio)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("EstacionamientoDeleteByIdBarrio");

            myDatabase.AddInParameter(myCommand, "@idBarrio", DbType.Int32, idBarrio);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #22
0
        /// Actualiza registros de la tabla Plaza.
        /// </summary>
        /// <param name="idPlaza"></param>
        /// <param name="idEstacionamiento"></param>
        /// <param name="idUsuario"></param>
        /// <param name="idTarifa"></param>
        /// <param name="disponible"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void UpdateNOAvailable(int idPlaza, string idUsuario)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("PlazaUpdateNOAvailable");

            myDatabase.AddInParameter(myCommand, "@idPlaza", DbType.Int32, idPlaza);
            myDatabase.AddInParameter(myCommand, "@idUsuario", DbType.String, idUsuario);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #23
0
        public static DataSet MisReservasSelectByPagoStateAndUserId(bool pago, string userId)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("MisReservasSelectByPagoStateAndUserId");

            myDatabase.AddInParameter(myCommand, "@pago", DbType.Boolean, pago);
            myDatabase.AddInParameter(myCommand, "@userId", DbType.String, userId);

            return(myDatabase.ExecuteDataSet(myCommand));
        }
Пример #24
0
        /// <summary>
        /// Actualiza registros de la tabla TipoReclamo.
        /// </summary>
        /// <param name="idTipoReclamo"></param>
        /// <param name="descripcion"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Update(int idTipoReclamo, string descripcion)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoReclamoUpdate");

            myDatabase.AddInParameter(myCommand, "@idTipoReclamo", DbType.Int32, idTipoReclamo);
            myDatabase.AddInParameter(myCommand, "@descripcion", DbType.String, descripcion);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #25
0
        public static void ReservaUpdateFinalizado(DateTime fecha, string hora)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("ReservaUpdateFinalizado");

            myDatabase.AddInParameter(myCommand, "@fecha", DbType.Date, fecha);
            myDatabase.AddInParameter(myCommand, "@hora", DbType.String, hora);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #26
0
        /// <summary>
        /// Actualiza registros dentro de la tabla AspNetUserRoles.
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="roleId"></param>
        /// <returns></returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Update(string userId, string roleId)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("AspNetUserRolesUpdate");

            myDatabase.AddInParameter(myCommand, "@UserId", DbType.String, userId);
            myDatabase.AddInParameter(myCommand, "@RoleId", DbType.String, roleId);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #27
0
        public static void PlazaUpdateStatePayment(int idPlaza, bool pago)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("PlazaUpdateStatePayment");

            myDatabase.AddInParameter(myCommand, "@idPlaza", DbType.Int32, idPlaza);
            myDatabase.AddInParameter(myCommand, "@pago", DbType.Boolean, pago);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #28
0
        /// <summary>
        /// Actualiza registros de la tabla Zona.
        /// </summary>
        /// <param name="idZona"></param>
        /// <param name="descripcion"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Update(int idZona, string descripcion, string direccion, decimal precioKm)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("ZonaUpdate");

            myDatabase.AddInParameter(myCommand, "@idZona", DbType.Int32, idZona);
            myDatabase.AddInParameter(myCommand, "@descripcion", DbType.String, descripcion);
            myDatabase.AddInParameter(myCommand, "@direccion", DbType.String, direccion);
            myDatabase.AddInParameter(myCommand, "@precioKm", DbType.Decimal, precioKm);
            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #29
0
        /// <summary>
        /// Actualiza registros de la tabla TipoInfraccion.
        /// </summary>
        /// <param name="idTipoInfraccion"></param>
        /// <param name="descripcion"></param>
        /// <param name="porcentaje"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static void Update(int idTipoInfraccion, string descripcion, decimal porcentaje)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoInfraccionUpdate");

            myDatabase.AddInParameter(myCommand, "@idTipoInfraccion", DbType.Int32, idTipoInfraccion);
            myDatabase.AddInParameter(myCommand, "@descripcion", DbType.String, descripcion);
            myDatabase.AddInParameter(myCommand, "@porcentaje", DbType.Decimal, porcentaje);

            myDatabase.ExecuteNonQuery(myCommand);
        }
Пример #30
0
        /// <summary>
        /// Inserta registros dentro de la tabla TipoEstadia.
        /// </summary>
        /// <param name="descripcion"></param>
        /// <returns></returns>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [JEISOLO]	23/09/2017 22:58:17
        /// </history>
        public static int Insert(string descripcion)
        {
            Database  myDatabase = new SqlDatabase(DALUtilities.getConnection());
            DbCommand myCommand  = myDatabase.GetStoredProcCommand("TipoEstadiaInsert");

            myDatabase.AddInParameter(myCommand, "@descripcion", DbType.String, descripcion);

            //Ejecuta la consulta y retorna el nuevo identity.
            int returnValue = Convert.ToInt32(myDatabase.ExecuteScalar(myCommand));

            return(returnValue);
        }