Example #1
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from Usuarios where Usuario=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdUsuario = (int)dt.Rows[0]["IdUsuario"];
                Usuario   = dt.Rows[0]["Usuario"].ToString();
                Clave     = dt.Rows[0]["Clave"].ToString();
                Email     = dt.Rows[0]["Email"].ToString();

                mesj = true;
            }
            return(mesj);
        }
Example #2
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from Categorias where IdCategoria=" + Id);
            if (dt.Rows.Count > 0)
            {
                Tipo        = (int)dt.Rows[0]["Tipo"];
                Descripcion = dt.Rows[0]["Descripcion"].ToString();

                mesj = true;
            }
            return(mesj);
        }
Example #3
0
        public bool Buscar(int Id)
        {
            bool      retorno = false;
            DataTable dt      = new DataTable();

            dt = conexion.BuscarDb("select * from Peliculas where PeliculaId = " + Id + "");
            if (dt.Rows.Count > 0)
            {
                retorno            = true;
                this.PeliculaId    = (int)dt.Rows[0]["PeliculaId"];
                this.titulo        = dt.Rows[0]["titulo"].ToString();
                this.descripcion   = dt.Rows[0]["descripcion"].ToString();
                this.genero        = (int)dt.Rows[0]["genero"];
                this.idioma        = dt.Rows[0]["idioma"].ToString();
                this.director      = dt.Rows[0]["director"].ToString();
                this.duracion      = (int)dt.Rows[0]["duracion"];
                this.pais          = dt.Rows[0]["pais"].ToString();
                this.anio          = (int)dt.Rows[0]["anio"];
                this.protagonistas = dt.Rows[0]["protagonistas"].ToString();
                this.categoria     = (int)dt.Rows[0]["categoria"];
            }

            return(retorno);
        }
Example #4
0
        public bool Buscar()
        {
            bool      mensaje    = false;
            Conexion  conexiondb = new Conexion();
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From Suplidor where IdSuplidor =" + IdSuplidor);
            if (dt.Rows.Count > 0)
            {
                mensaje = true;
                //this.IdSuplidor = (int)dt.Rows[0]["IdSuplidor"];
                this.Nombres = (string)dt.Rows[0]["Nombres"];
            }
            return(mensaje);
        }
Example #5
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from PresupuestoDetalles where IdPresupuestoDetalle=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdCategoria = (int)dt.Rows[0]["IdCategoria"];
                Valor       = (double)dt.Rows[0]["Valor"];

                mesj = true;
            }
            return(mesj);
        }
Example #6
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from CobroDetalle where IdCobro=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdCxC = (int)dt.Rows[0]["IdCxC"];
                Valor = (double)dt.Rows[0]["Valor"];

                mesj = true;
            }
            return(mesj);
        }
Example #7
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from Presupuestos where IdPresupuesto=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdPresupuesto = (int)dt.Rows[0]["IdPresupuesto"];
                Fecha         = (DateTime)dt.Rows[0]["Fecha"];
                Descripcion   = dt.Rows[0]["Descripcion"].ToString();

                mesj = true;
            }
            return(mesj);
        }
Example #8
0
        public bool Buscar()
        {
            bool retorno = false;

            dt = conexiondb.BuscarDb("Select * from Tecnicos where IdTecnicos =" + IdTecnicos);
            if (dt.Rows.Count > 0)
            {
                retorno     = true;
                Nombres     = (string)dt.Rows[0]["Nombres"];
                Direccion   = (string)dt.Rows[0]["Direccion"];
                Telefono    = (string)dt.Rows[0]["Telefono"];
                Email       = (string)dt.Rows[0]["Email"];
                PctComision = (double)dt.Rows[0]["PctComision"];
            }
            return(retorno);
        }
Example #9
0
        public bool BuscarId(string Nombre)
        {
            Conexion  conexiondb = new Conexion();
            Boolean   paso       = false;
            DataTable Datos      = new DataTable();

            Datos = conexiondb.BuscarDb("Select * from Usuarios where Nombre = '" + Nombre + "'");

            if (Datos.Rows.Count > 0)
            {
                this.IdUsuario = (int)Datos.Rows[0]["IdUsuario"];
                paso           = true;
            }

            return(paso);
        }
Example #10
0
        public bool Buscar(string Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from Cuentas where IdCuenta=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdCuenta    = (int)dt.Rows[0]["IdCuenta"];
                Balance     = (Double)dt.Rows[0]["Balance"];
                Descripcion = dt.Rows[0]["Descripcion"].ToString();

                mesj = true;
            }
            return(mesj);
        }
Example #11
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from CobroCxC where IdCobro=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdCobro  = (int)dt.Rows[0]["IdCobro"];
                IdCuenta = (int)dt.Rows[0]["IdCuenta"];
                Fecha    = (DateTime)dt.Rows[0]["Fecha"];
                Valor    = (double)dt.Rows[0]["Valor"];

                mesj = true;
            }
            return(mesj);
        }
Example #12
0
        public bool Buscar()
        {
            Conexion  conexiondb = new Conexion();
            bool      retorno    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *from TiposEquipos where IdEquipo = " + IdEquipo);

            if (dt.Rows.Count > 0)
            {
                retorno     = true;
                IdEquipo    = (int)dt.Rows[0]["IdEquipo"];
                Descripcion = (string)dt.Rows[0]["Descripcion"];
            }

            return(retorno);
        }
Example #13
0
        public bool Buscar()
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From PagoTecnico where IdPagoTecnico =" + IdPagoTecnico);
            if (dt.Rows.Count > 0)
            {
                mensaje         = true;
                this.Fecha      = (DateTime)dt.Rows[0]["Fecha"];
                this.IdTecnico  = (int)dt.Rows[0]["IdTecnico"];
                this.IdUsuario  = (int)dt.Rows[0]["IdUsuario"];
                this.FechaCorte = (DateTime)dt.Rows[0]["FechaCorte"];
                this.Monto      = (double)dt.Rows[0]["Monto"];
            }
            return(mensaje);
        }
Example #14
0
        public bool Buscar()
        {
            bool retorno = false;

            dt = conexiondb.BuscarDb("Select * from TrabajoRecepciones where IdTrabajoRecepciones = " + IdTrabajoRecepciones);
            if (dt.Rows.Count > 0)
            {
                retorno     = true;
                IdRecepcion = (int)dt.Rows[0]["IdRecepcion"];
                IdArticulo  = (int)dt.Rows[0]["IdArticulo"];
                IdTecnico   = (int)dt.Rows[0]["IdTecnico"];
                IdUsuario   = (int)dt.Rows[0]["IdUsuario"];
                Precio      = (double)dt.Rows[0]["Precio"];
                Costo       = (double)dt.Rows[0]["Costo"];
                esPago      = (bool)dt.Rows[0]["esPago"];
            }
            return(retorno);
        }
Example #15
0
        public bool Buscar()
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From Clientes where IdCliente =" + IdCliente);
            if (dt.Rows.Count > 0)
            {
                mensaje        = true;
                this.Nombres   = (string)dt.Rows[0]["Nombres"];
                this.Telefono  = (string)dt.Rows[0]["Telefono"];
                this.Celular   = (string)dt.Rows[0]["Celular"];
                this.Direccion = (string)dt.Rows[0]["Direccion"];
                this.Email     = (string)dt.Rows[0]["Email"];
            }
            return(mensaje);
        }
Example #16
0
        public bool Buscar()
        {
            bool      Retorno    = false;
            DataTable Datos      = new DataTable();
            Conexion  conexiondb = new Conexion();

            Datos = conexiondb.BuscarDb("Select * from Usuarios Where IdUsuario = " + IdUsuario);
            if (Datos.Rows.Count > 0)
            {
                Retorno             = true;
                this.IdUsuario      = (int)Datos.Rows[0]["IdUsuario"];
                this.Nombre         = (string)Datos.Rows[0]["Nombre"];
                this.Clave          = (string)Datos.Rows[0]["Clave"];
                this.ConfirmarClave = (string)Datos.Rows[0]["ConfirmarClave"];
            }

            return(Retorno);
        }
Example #17
0
        public bool Buscar()
        {
            bool retorno = false;

            dt = conexiondb.BuscarDb("Select * from Recepciones where IdRecepciones =" + IdRecepciones);
            if (dt.Rows.Count > 0)
            {
                retorno       = true;
                Fecha         = (DateTime)dt.Rows[0]["Fecha"];
                IdCliente     = (int)dt.Rows[0]["IdCliente"];
                IdEquipo      = (int)dt.Rows[0]["IdEquipo"];
                IdDiagnostico = (int)dt.Rows[0]["IdDiagnostico"];
                IdEstado      = (int)dt.Rows[0]["IdEstado"];
                IdUsuario     = (int)dt.Rows[0]["IdUsuario"];
                Serial        = (string)dt.Rows[0]["Serial"];
                Observaciones = (string)dt.Rows[0]["Observaciones"];
            }
            return(retorno);
        }
Example #18
0
        public bool Buscar()
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From Entregas where IdEntrega =" + IdEntrega);
            if (dt.Rows.Count > 0)
            {
                mensaje            = true;
                this.Fecha         = (DateTime)dt.Rows[0]["Fecha"];
                this.IdRecepcion   = (int)dt.Rows[0]["IdRecepcion"];
                this.IdUsuario     = (int)dt.Rows[0]["IdUsuario"];
                this.Observaciones = (string)dt.Rows[0]["Observaciones"];
                this.Monto         = (double)dt.Rows[0]["Monto"];
                this.Descuento     = (double)dt.Rows[0]["Descuento"];
            }
            return(mensaje);
        }
Example #19
0
        public bool Buscar()
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From Articulos where IdArticulo =" + IdArticulo);
            if (dt.Rows.Count > 0)
            {
                mensaje = true;

                this.Descripcion = (string)dt.Rows[0]["Descripcion"];
                this.Tipo        = (string)dt.Rows[0]["Tipo"];
                this.Existencia  = (int)dt.Rows[0]["Existencia"];
                this.Costo       = (double)dt.Rows[0]["Costo"];
                this.Precio      = (double)dt.Rows[0]["Precio"];
            }
            return(mensaje);
        }
Example #20
0
        public bool Buscar(int IdCompra)
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From Compras where IdCompra =" + IdCompra);
            if (dt.Rows.Count > 0)
            {
                mensaje = true;


                this.IdUsuario  = (int)dt.Rows[0]["IdUsuario"];
                this.IdSuplidor = (int)dt.Rows[0]["IdSuplidor"];
                this.Fecha      = (DateTime)dt.Rows[0]["Fecha"];
                this.Monto      = (double)dt.Rows[0]["Monto"];
            }
            return(mensaje);
        }
Example #21
0
        public bool Buscar(int IdCompraDetalle)
        {
            Conexion  conexiondb = new Conexion();
            bool      mensaje    = false;
            DataTable dt         = new DataTable();

            dt = conexiondb.BuscarDb("Select *From ComprasDetalle where IdCompraDetalle =" + IdCompraDetalle);
            if (dt.Rows.Count > 0)
            {
                mensaje = true;

                this.IdCompraDetalle = (int)dt.Rows[0]["IdCompraDetalle"];
                this.IdCompra        = (int)dt.Rows[0]["IdCompra"];
                this.IdArticulo      = (int)dt.Rows[0]["IdArticulo"];
                this.Cantidad        = (int)dt.Rows[0]["Cantidad"];
                this.Costo           = (double)dt.Rows[0]["Costo"];
            }
            return(mensaje);
        }
Example #22
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from Transferencias where IdTransferencia=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdTranferencia  = (int)dt.Rows[0]["IdTransferencia"];
                Fecha           = (DateTime)dt.Rows[0]["Fecha"];
                IdCuentaDestino = (int)dt.Rows[0]["IdCuentaDestino"];
                IdCuentaOrigen  = (int)dt.Rows[0]["IdCuentaOrigen"];
                Descripcion     = dt.Rows[0]["Descripcion"].ToString();
                Valor           = (double)dt.Rows[0]["Valor"];

                mesj = true;
            }
            return(mesj);
        }
Example #23
0
        public bool Buscar(int Id)
        {
            bool      mesj = false;
            DataTable dt   = new DataTable();

            dt = ConexiondB.BuscarDb("Select *from CxC where IdCxC=" + Id);
            if (dt.Rows.Count > 0)
            {
                IdCxC       = (int)dt.Rows[0]["IdCxC"];
                IdCuenta    = (int)dt.Rows[0]["IdCuenta"];
                Fecha       = (DateTime)dt.Rows[0]["Fecha"];
                Valor       = (double)dt.Rows[0]["Valor"];
                Balance     = (double)dt.Rows[0]["Balance"];
                Descripcion = dt.Rows[0]["Descripcion"].ToString();


                mesj = true;
            }
            return(mesj);
        }
Example #24
0
        public DataTable Lista(String Campos, String Filtro)
        {
            Conexion conexiondb = new Conexion();

            return(conexiondb.BuscarDb("Select " + Campos + " from PagoTecnico where " + Filtro));
        }
Example #25
0
        public DataTable Lista(string Campos, string Filtro)
        {
            Conexion conexiondb = new Conexion();

            return(conexiondb.BuscarDb("Select " + Campos + " from TrabajoRecepciones where  " + Filtro));
        }
Example #26
0
        public static DataTable Lista(String Campos, String FiltroWhere)
        {
            Conexion c = new Conexion();

            return(c.BuscarDb("Select " + Campos + " from " + FiltroWhere));
        }
Example #27
0
        public DataTable Listar(String campo, String filtrowhere)  //*,1=1
        {
            Conexion conexion = new Conexion();

            return(conexion.BuscarDb("select " + campo + " from Generos where " + filtrowhere));
        }
Example #28
0
        public DataTable Listar(String campos, String filtrowhere)
        {
            Conexion conexion = new Conexion();

            return(conexion.BuscarDb("select " + campos + " from Categorias where " + filtrowhere));
        }
Example #29
0
        public static DataTable ListaF(string fecha1, string fecha2)
        {
            Conexion ConexionDB = new Conexion();

            return(ConexionDB.BuscarDb("select * from Transferencias where Fecha   <='" + fecha1 + "' and Fecha >='" + fecha2 + "' "));
        }
Example #30
0
        public DataTable Lista(String Campo, String Filtro)
        {
            Conexion conexiondb = new Conexion();

            return(conexiondb.BuscarDb("Select " + Campo + " from TiposEquipos where  " + Filtro));
        }