Esempio n. 1
0
        public static IDataReader ObtenerAnalisisDePrecios(string NumeroId)
        {
            string Sentencia = "SELECT * FROM Benef";

            //Sentencia += "WHERE (Numero = " + NumeroId + ")";

            return(AyudanteMSSql.EjecutarDataReader(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 2
0
        public static DataSet BuscarSuministro(string Busqueda)
        {
            string Sentencia = "SELECT * FROM Suministros WHERE ";

            Sentencia += "(Descripcion LIKE '%" + Busqueda + "%') ";
            Sentencia += "ORDER BY Descripcion";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 3
0
        public static DataSet ObtenerChequesOP(string Orden)
        {
            string Sentencia = "select c.denom_banc, b.che_cta, a.che_nro, a.monto, b.che_fecha ";

            Sentencia += "from det_op_cheques a, Cheques b, bancos c ";
            Sentencia += "where (a.codigo_orden = '" + Orden + "') and (a.che_nro = b.che_nro) and (b.che_accion = 'CHEQUE EMITIDO') and (b.che_cod_bco = c.cod_banco) ";
            Sentencia += "ORDER BY c.denom_banc, b.che_cta, a.che_nro";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 4
0
        public static DataSet ObtenerBeneficiariosOP(string Beneficiario)
        {
            string Sentencia = "SELECT * FROM Orden_Pago WHERE ";

            Sentencia += "((Cod_Benef = '" + Regex.Replace(Beneficiario, "'", "''") + "') ";
            Sentencia += "AND (Indi_anulacion = '0')) ";
            Sentencia += "ORDER BY Nro_Orden DESC";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 5
0
        public static IDataReader ObtenerBeneficiarios(string Busqueda)
        {
            string Sentencia = "SELECT * FROM Benef WHERE ";

            Sentencia += "(RIF LIKE '%" + Busqueda + "%') OR ";
            Sentencia += "(Nombre LIKE '%" + Busqueda + "%') ";
            Sentencia += "ORDER BY Nombre";

            return(AyudanteMSSql.EjecutarDataReader(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
        public static IDataReader ObtenerOrdenesCompras(string Sector, DateTime Desde, DateTime Hasta)
        {
            string Sentencia = "SELECT DISTINCT a.Nro_Comp, a.Fecha_Orden, a.Direccion,";

            Sentencia += " d.Rif, d.Nombre, b.Monto, left(c.Nro_det, 10) as Codigo, cast(b.Obs as varchar(200)) as Observacion, a.Indi_Anulacion";
            Sentencia += " FROM Orden_Compra a, Comprom b, Det_Comp c, Benef d";
            Sentencia += " WHERE (a.Nro_Comp = b.Nro_Comp) and (b.Tipo = 'OC') and";
            Sentencia += " (b.Cod_Benef = d.Cod_Benef) and (b.Nro_Refer = c.Nro_Refer) and";
            Sentencia += " (left(c.Nro_det,2) = ";
            Sentencia += Sector + ") and (a.Fecha_Orden >= '" + Desde.ToShortDateString();
            Sentencia += "')";

            return(AyudanteMSSql.EjecutarDataReader(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 7
0
        public static DataSet EjecucionObras(string Presupuesto, string Fecha)
        {
            string Sentencia = "select Obras_E.NRO_DET, Obras_E.COD_OBRA, Obras_E.DENOM, Obras_E.mont_ppt as Asignado, ";

            Sentencia += "(Select sum(Det_Modif.Monto) from Det_Modif where ";
            Sentencia += "(Obras_E.NRO_DET = Det_Modif.NRO_DET) and (Obras_E.COD_OBRA = Det_Modif.OBRA) and (Det_Modif.ANO_PPTO = Obras_E.ANO_PPTO) and (Det_Modif.Tipo_aux <> 'RI') and (Det_Modif.Indi_Anulacion = '0') and (Det_Modif.Fecha_aux <= '" + Regex.Replace(Fecha, "'", "''") + "')) as Modificado,";
            Sentencia += "(Select sum(Det_Modif.Monto) from Det_Modif where ";
            Sentencia += "(Obras_E.NRO_DET = Det_Modif.NRO_DET) and (Obras_E.COD_OBRA = Det_Modif.OBRA) and (Det_Modif.ANO_PPTO = Obras_E.ANO_PPTO) and (Det_Modif.Tipo_aux = 'RI') and (Det_Modif.Indi_Anulacion = '0') and (Det_Modif.Fecha_aux <= '" + Regex.Replace(Fecha, "'", "''") + "')) as Reintegro,";
            Sentencia += "(Select sum(Det_Comp.Monto_Comp) from Det_Comp where ";
            Sentencia += "(Obras_E.NRO_DET = Det_Comp.NRO_DET) and (Obras_E.COD_OBRA = Det_Comp.COD_OBRA) and (Det_Comp.ANO_PPTO = Obras_E.ANO_PPTO) and (Det_Comp.Indi_Anulacion = '0') and (Det_Comp.Fecha_aux <= '" + Regex.Replace(Fecha, "'", "''") + "')) as Comprometido,";
            Sentencia += "(Select sum(Det_Caus.Monto) from Det_Caus where ";
            Sentencia += "(Obras_E.NRO_DET = Det_Caus.NRO_DET) and (Obras_E.COD_OBRA = Det_Caus.COD_OBRA) and (Det_Caus.ANO_PPTO = Obras_E.ANO_PPTO) and (Det_Caus.Indi_Anulacion = '0') and (Det_Caus.Fecha_aux <= '" + Regex.Replace(Fecha, "'", "''") + "')) as Causado,";
            Sentencia += "(Select sum(Det_Pago.Monto_Pord) from Det_Pago where ";
            Sentencia += "(Obras_E.NRO_DET = Det_Pago.NRO_DET) and (Obras_E.COD_OBRA = Det_Pago.COD_OBRA) and (Det_Pago.ANO_PPTO = Obras_E.ANO_PPTO) and (Det_Pago.Indi_Anulacion = '0') and (Det_Pago.Fecha_aux <= '" + Regex.Replace(Fecha, "'", "''") + "')) as Pagado ";
            Sentencia += "from Obras_E ";
            Sentencia += "where (Obras_E.ANO_PPTO = '" + Regex.Replace(Presupuesto, "'", "''") + "') ";
            Sentencia += "group by Obras_E.NRO_DET, Obras_E.COD_OBRA, Obras_E.DENOM with rollup ";
            Sentencia += "order by Obras_E.NRO_DET, Obras_E.COD_OBRA ";


            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
        public static DataSet ObtenerPartidas()
        {
            string Sentencia = "SELECT cod_ing, descripcion FROM Ingresos ORDER BY descripcion";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
        public static DataSet ObtenerCuentas()
        {
            string Sentencia = "SELECT bcocta_numero FROM Bancos_Ctas WHERE bcocta_tipo =  '3' ORDER BY bcocta_numero";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
        public static IDataReader ObtenerOrdenesServicios(string Sector, DateTime Desde, DateTime Hasta)
        {
            string Sentencia = "SELECT * FROM Benef";

            return(AyudanteMSSql.EjecutarDataReader(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 11
0
        public static IDataReader ObtenerBeneficiarios()
        {
            string Sentencia = "SELECT * FROM Benef";

            return(AyudanteMSSql.EjecutarDataReader(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }
Esempio n. 12
0
        public static DataSet ObtenerProveedores()
        {
            string Sentencia = "SELECT Nombre FROM Benef WHERE TIPO =  'PR' ORDER BY Nombre";

            return(AyudanteMSSql.EjecutarDataSet(ConfigurationSettings.AppSettings["ConexionApoyo"], System.Data.CommandType.Text, Sentencia));
        }