Exemple #1
0
        public void EliminarGasto(string filtro)
        {
            IGastosSQL GastosSQL = this.ObtenerInstancia();

            GastosSQL.EliminarGasto(filtro);
            if (GastosSQL.IsError)
            {
                this.IsError          = GastosSQL.IsError;
                this.ErrorDescripcion = GastosSQL.ErrorDescripcion;
            }
        }
Exemple #2
0
        public void EditarGasto(int id, string descripcion)
        {
            IGastosSQL GastosSQL = this.ObtenerInstancia();

            GastosSQL.EditarGasto(id, descripcion);
            if (GastosSQL.IsError)
            {
                this.IsError          = GastosSQL.IsError;
                this.ErrorDescripcion = GastosSQL.ErrorDescripcion;
            }
        }
Exemple #3
0
        public void InsertarGasto(string descripcion, double monto, DateTime fecha)
        {
            IGastosSQL GastosSQL = this.ObtenerInstancia();

            GastosSQL.InsertarGasto(descripcion, monto, fecha);
            if (GastosSQL.IsError)
            {
                this.IsError          = GastosSQL.IsError;
                this.ErrorDescripcion = GastosSQL.ErrorDescripcion;
            }
        }
Exemple #4
0
        public DataSet TraerGastoRangoFecha(string fecha_desde, string fecha_hasta)
        {
            IGastosSQL GastosSQL = this.ObtenerInstancia();
            DataSet    datos     = GastosSQL.TraerGastoRangoFecha(fecha_desde, fecha_hasta);

            if (GastosSQL.IsError)
            {
                this.IsError          = GastosSQL.IsError;
                this.ErrorDescripcion = GastosSQL.ErrorDescripcion;
            }
            return(datos);
        }
Exemple #5
0
        public DataSet TraerGasto(string filtro)
        {
            IGastosSQL GastosSQL = this.ObtenerInstancia();
            DataSet    datos     = GastosSQL.TraerGasto(filtro);

            if (GastosSQL.IsError)
            {
                this.IsError          = GastosSQL.IsError;
                this.ErrorDescripcion = GastosSQL.ErrorDescripcion;
            }
            return(datos);
        }
Exemple #6
0
        public IGastosSQL ObtenerInstancia()
        {
            IGastosSQL GastosSQL = null;

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

            default:
                break;
            }
            return(GastosSQL);
        }