Exemple #1
0
        public bool LlenarCiudad()
        {
            if (gvCiudad == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Ciudad";
            objGrid.gsNomTabla = "Ciudad";
            objGrid.gsGvGen    = gvCiudad;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCiudad = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
        public bool LlenarGridVehiculosDisponibles()
        {
            if (grdInformeVehiculos == null)
            {
                error = "No definió el grid del informe de vehiculos";
                return(false);
            }
            SQL = "SP_Consultar_Vehiculos_Disponibles";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdInformeVehiculos;
            oGrid.AgregarParametro("@parametro_busqueda", parametroBusqueda);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformeVehiculos = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #3
0
        public bool LlenarGrid()
        {
            if (grdRepuesto == null)
            {
                error = "No definió el grid del repuesto";
                return(false);
            }
            SQL = "Repuesto_LlenarGrid";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdRepuesto;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdRepuesto = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarCabOrd()
        {
            if (gvCabOrd == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "CABPEDIDOS_S";
            objGrid.gsNomTabla = "Cabecera";
            objGrid.gsGvGen    = gvCabOrd;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCabOrd = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
Exemple #5
0
        public bool LlenarGridPorCriterio()
        {
            if (grdInformePagos == null)
            {
                error = "No definió el grid del informe de pagos";
                return(false);
            }
            SQL = "SP_Consultar_PagoXCriterio";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdInformePagos;
            oGrid.AgregarParametro("@parametro_busqueda", parametroBusqueda);
            oGrid.AgregarParametro("@fecha_inicial", parametroFechaInicial);
            oGrid.AgregarParametro("@fecha_final", parametroFechaFinal);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformePagos = oGrid.gridGenerico;
                oGrid           = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGrid()
        {
            if (grdInformeVehiculos == null)
            {
                error = "No definió el grid del informe de vehiculos";
                return(false);
            }
            SQL = "SP_Consultar_vehiculo";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdInformeVehiculos;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformeVehiculos = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGridCliente()
        {
            if (gvCliente == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Empleado";
            objGrid.gsNomTabla = "Clientes";
            objGrid.gsGvGen    = gvCliente;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCliente = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
        public bool LlenarGrIdProducto()
        {
            if (gvProducto == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Producto";
            objGrid.gsNomTabla = "Productos";
            objGrid.gsGvGen    = gvProducto;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvProducto = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
Exemple #9
0
        public bool LlenarGrid(string fecha_inicial, string fecha_final)
        {
            SQL = "SELECT dbo.TBL_VEHICULO.ID_VEHICULO, dbo.TBL_VEHICULO.COLOR, dbo.TBL_VEHICULO.MARCA, " +
                  " dbo.TBL_VEHICULO.PLACA, dbo.TBL_VEHICULO.MODELO, dbo.TBL_CLIENTE.NOMBRE_COMPLETO, " +
                  " dbo.TBL_RESERVA.FECHA_LLEGADA " +
                  " FROM  dbo.TBL_VEHICULO INNER JOIN" +
                  " dbo.TBL_CLIENTE ON dbo.TBL_VEHICULO.ID_CLIENTE = dbo.TBL_CLIENTE.ID_CLIENTE INNER JOIN " +
                  " dbo.TBL_RESERVA ON dbo.TBL_CLIENTE.ID_CLIENTE = dbo.TBL_RESERVA.ID_CLIENTE where FECHA_LLEGADA between'" + fecha_inicial + "' and '" + fecha_final + "'";

            clsGrid oGrid = new clsGrid();

            oGrid.SQL = SQL;
            //oGrid.AgregarParametro("@prFactura", NumeroFactura);
            oGrid.gridGenerico = grid;
            //oGrid.NombreTabla = "Factura";
            if (oGrid.LlenarGridWeb())
            {
                grid  = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGridPorCriterio()
        {
            if (grdReservas == null)
            {
                error = "No definió el grid de reservas";
                return(false);
            }
            SQL = "SP_Consultar_ReservaXCodigo";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdReservas;
            oGrid.AgregarParametro("@Codigo", codigo);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdReservas = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGrid()
        {
            if (grdAlquiler == null)
            {
                error = "No definió el grid de alquileres";
                return(false);
            }
            SQL = "SP_Consultar_Alquiler";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdAlquiler;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdAlquiler = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #12
0
        public bool LlenarGrid(string Cedula)
        {
            SQL = "SELECT dbo.TBL_TURNO.TIPO_TURNO, dbo.TBL_TURNO.FECHA_INICIO, dbo.TBL_TURNO.FECHA_FIN, " +
                  " dbo.TBL_OPERARIO.NOMBRE_COMPLETO, dbo.TBL_OPERARIO.CC " +
                  " FROM dbo.TBL_TURNO INNER JOIN" +
                  " dbo.TBL_OPERARIO ON dbo.TBL_TURNO.ID_OPERARIO = dbo.TBL_OPERARIO.ID_OPERARIO " +
                  " WHERE (dbo.TBL_TURNO.FECHA_INICIO between '" + FechaInicio + "' and '" + FechaFin + "') AND (dbo.TBL_OPERARIO.CC = '" + Cedula + "');";

            clsGrid oGrid = new clsGrid();

            oGrid.SQL = SQL;
            //oGrid.AgregarParametro("@prFactura", NumeroFactura);
            oGrid.gridGenerico = grid;
            //oGrid.NombreTabla = "Factura";
            if (oGrid.LlenarGridWeb())
            {
                grid  = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #13
0
        public bool LlenarGrid()
        {
            if (grdFactura == null)
            {
                Error = "No definió el grid de la Factura";
                return(false);
            }
            SQL = "Factura_LlenarGrid";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.StoredProcedure = true;
            oGrid.AgregarParametro("@prNumeroFactura", NumeroFactura);
            oGrid.gridGenerico    = grdFactura;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdFactura = oGrid.gridGenerico;
                oGrid      = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #14
0
        public bool LlenarGrid()
        {
            if (objGrdReservas == null)
            {
                strError = "No definió el grid de Reservas";
                return(false);
            }

            strSQL = "SELECT     Promocion.Nombre AS Promocion, Implementos.Nombre AS Implementos, Servicio.Nombre AS Servicio, Tarifa.Nombre AS Tarifa, Tarifa.Valor AS ValorTarifa, " +
                     " Cliente.strDocumento_CLIE AS Cliente, Reservas.FechaIngreso AS Ingreso, Reservas.FechaSalida AS Salida, Cabaña.Nombre AS Cabaña " +
                     " FROM         Cabaña LEFT OUTER JOIN " +
                     " Tarifa ON Cabaña.IdTarifa = Tarifa.IdTarifa LEFT OUTER JOIN " +
                     " Promocion ON Cabaña.IdCabaña = Promocion.IdCabaña LEFT OUTER JOIN " +
                     " Servicio ON Cabaña.IdServicio = Servicio.IdServicio LEFT OUTER JOIN " +
                     " Implementos ON Cabaña.IdImplementos = Implementos.IdImplementos RIGHT OUTER JOIN " +
                     " Reservas ON Cabaña.IdCabaña = Reservas.IdCabaña LEFT OUTER JOIN " +
                     " Empleado ON Reservas.IdEmpleado = Empleado.strDocumento_EMPL LEFT OUTER JOIN " +
                     "  Cliente ON Reservas.IdCliente = Cliente.strDocumento_CLIE " +
                     "WHERE				dbo.Reservas.IdCliente = "+ strDocumento;

            //Se crea el objeto de grid y se le pasan las propiedades gridview, sql y nombre tabla
            clsGrid oGrid = new clsGrid();

            oGrid.gridGenerico = objGrdReservas;
            oGrid.SQL          = strSQL;
            oGrid.NombreTabla  = "Reserva";

            if (oGrid.LlenarGridWeb())
            {
                objGrdReservas = oGrid.gridGenerico;
                oGrid          = null;
                return(true);
            }
            else
            {
                strError = oGrid.Error;
                oGrid    = null;
                return(false);
            }
        }