Beispiel #1
0
        public void EliminarNota(int id)
        {
            INotasSQL NotasSQL = this.ObtenerInstancia();

            NotasSQL.EliminarNota(id);
            if (NotasSQL.IsError)
            {
                this.IsError          = NotasSQL.IsError;
                this.ErrorDescripcion = NotasSQL.ErrorDescripcion;
            }
        }
Beispiel #2
0
        public void InsertarNota(string nota, DateTime fecha_creacion)
        {
            INotasSQL NotasSQL = this.ObtenerInstancia();

            NotasSQL.InsertarNota(nota, fecha_creacion);
            if (NotasSQL.IsError)
            {
                this.IsError          = NotasSQL.IsError;
                this.ErrorDescripcion = NotasSQL.ErrorDescripcion;
            }
        }
Beispiel #3
0
        public void EditarNota(int id, string nota, DateTime fecha_edicion)
        {
            INotasSQL NotasSQL = this.ObtenerInstancia();

            NotasSQL.EditarNota(id, nota, fecha_edicion);
            if (NotasSQL.IsError)
            {
                this.IsError          = NotasSQL.IsError;
                this.ErrorDescripcion = NotasSQL.ErrorDescripcion;
            }
        }
Beispiel #4
0
        public DataSet TraerNotas(int id)
        {
            INotasSQL NotasSQL = this.ObtenerInstancia();
            DataSet   datos    = NotasSQL.TraerNotas(id);

            if (NotasSQL.IsError)
            {
                this.IsError          = NotasSQL.IsError;
                this.ErrorDescripcion = NotasSQL.ErrorDescripcion;
            }
            return(datos);
        }
Beispiel #5
0
        public INotasSQL ObtenerInstancia()
        {
            INotasSQL NotasSQL = null;

            switch (AccesoDatos.Instance.accesoDatos.ContextDataBase)
            {
            case ContextDataBase.PostgreSql:
                NotasSQL = new NotasPostgres();
                break;

            default:
                break;
            }
            return(NotasSQL);
        }