Ejemplo n.º 1
0
 public bool Modificar()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     con.EjecutarDB("upadate Profesores set Nombres= '" + Nombres + "', Apellidos='" + Apellidos + "', Direccion= '" + Genero + "'"
                    + " FechaNacimiento='" + FechaNacimiento + "',Email='" + Email + "',Telefono1='" + Telefono1 + "',Telefono2='" + Telefono2 + "' where IdAsignatura=" + IdProfesor);
     return(true);
 }
Ejemplo n.º 2
0
 public bool Insertar()
 {
     string querry = "insert into Profesores(Nombres,Apellidos,Direccion,Genero,FechaNacimiento,Email,Telefono1,Telefono2)"
         + " values('" + Nombres + "','" + Apellidos + "','" + Direccion + "','" + Genero + "','" + FechaNacimiento + "','" + Email + "','" + Telefono1 + "','" + Telefono2 + "')";
     DAL.ConexionDb con = new DAL.ConexionDb();
     return con.EjecutarDB(querry);
 }
Ejemplo n.º 3
0
        public DataTable Buscar(string campos, string condicion)
        {
            string querry = "select " + campos + " from Profesores where " + condicion;

            DAL.ConexionDb con = new DAL.ConexionDb();
            return(con.BuscarDb(querry));
        }
Ejemplo n.º 4
0
 public bool update()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     return con.EjecutarDB("upadate Secciones set Numero =" + Numero + " ,IdAsignatura=" + IdAsignatura + ", IdProfesor='" + IdProfesor
         + ",Aula= '" + Aula + "', HoraInicio='" + HoraInicio + "', HoraFin='" + HoraFin + "',Activa='" + Activa
         + "' where IdSeccion= " + IdSeccion); ;
 }
Ejemplo n.º 5
0
 public bool update()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     return(con.EjecutarDB("upadate Secciones set Numero =" + Numero + " ,IdAsignatura=" + IdAsignatura + ", IdProfesor='" + IdProfesor
                           + ",Aula= '" + Aula + "', HoraInicio='" + HoraInicio + "', HoraFin='" + HoraFin + "',Activa='" + Activa
                           + "' where IdSeccion= " + IdSeccion));;
 }
Ejemplo n.º 6
0
 public bool Modificar()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     con.EjecutarDB("upadate Profesores set Nombres= '" + Nombres + "', Apellidos='" + Apellidos + "', Direccion= '" + Genero + "'"
         + " FechaNacimiento='" + FechaNacimiento + "',Email='" + Email + "',Telefono1='" + Telefono1 + "',Telefono2='" + Telefono2 + "' where IdAsignatura=" + IdProfesor);
     return true;
 }
Ejemplo n.º 7
0
        public bool Insertar()
        {
            string querry = "insert into Profesores(Nombres,Apellidos,Direccion,Genero,FechaNacimiento,Email,Telefono1,Telefono2)"
                            + " values('" + Nombres + "','" + Apellidos + "','" + Direccion + "','" + Genero + "','" + FechaNacimiento + "','" + Email + "','" + Telefono1 + "','" + Telefono2 + "')";

            DAL.ConexionDb con = new DAL.ConexionDb();
            return(con.EjecutarDB(querry));
        }
Ejemplo n.º 8
0
        public bool Insertar()
        {
            string querry = "insert into Secciones(Numero,IdAsignatura,IdProfesor,Aula,HoraInicio,HoraFin,Activa)"
                            + " values(" + Numero + "," + IdAsignatura + "," + IdProfesor
                            + ",'" + Aula + "','" + HoraInicio + "','" + HoraFin + "','" + Activa + "')";

            DAL.ConexionDb con = new DAL.ConexionDb();
            return(con.EjecutarDB(querry));
        }
Ejemplo n.º 9
0
        public bool Insertar()
        {
            string querry = "insert into Secciones(Numero,IdAsignatura,IdProfesor,Aula,HoraInicio,HoraFin,Activa)"
                + " values(" + Numero + "," + IdAsignatura + "," + IdProfesor 
                + ",'" + Aula + "','" + HoraInicio + "','" + HoraFin + "','" + Activa + "')";
            DAL.ConexionDb con = new DAL.ConexionDb();
            return con.EjecutarDB(querry);

        }
Ejemplo n.º 10
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdMotor = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Motores (Fabricante, Modelo, IdColor, NumeroChasis, AProduccion, Precio) values ('" + this.Fabricante + "','" + this.Modelo + "','" + this.IdColor + "','" + this.NumeroChasis + "','" + this.AProduccion + "','" + this.Precio + "')Select @@Identity"));
     if (this.IdMotor > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 11
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdCobroDetalle = Convert.ToInt32(conexion.ObtenerValorDb("Insert into CobroDetalles (IdCobro, Fecha, BalanceQuota, Interes, BalanceInteres, Quotas) values (" + this.IdCobro + ", GETDATE(),'" + this.BalanceQuota + "','" + this.Interes + "','" + this.BalanceInteres + "','" + this.Quotas + "')Select @@Identity"));
     if (this.IdCobroDetalle > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 12
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdCobro = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Cobros (Fecha, Balance, Abono, IdFinanciamiento) values (GETDATE(),'" + this.Balance + "','" + this.Abono + "', " + this.IdFinanciamiento + ")Select @@Identity"));
     if (this.IdCobro > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 13
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdFinanciamiento = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Financiamientos (Fecha, IdPersona, IdGarante, IdMotor, Balance, IntervaloPago, Inicial) values (GETDATE(),'" + this.IdPersona + "','" + this.IdGarante + "','" + this.IdMotor + "','" + this.Balance + "','" + this.IntervaloPago + "' , " + this.Inicial + ")Select @@Identity"));
     if (this.IdFinanciamiento > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 14
0
 public bool Insertar()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdPersona = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Personas ( IsClient, Ingreso , Cedula, Telefono ,Direccion, Nombre, Apellido) values ('" + this.IsClient + "','" + this.Ingreso + "','" + this.Cedula + "','" + this.Telefono + "','" + this.Direccion + "','" + this.Nombre + "','" + this.Apellido + "')Select @@Identity"));
     if (this.IdPersona > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 15
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdUsuario = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Usuarios (Fecha, NombreUsuario, Nombres, Contra, Email) values (GETDATE(),'" + this.NombreUsuario + "','" + this.Nombres + "','" + this.Contra + "','" + this.Email + "')Select @@Identity"));
     if (this.IdUsuario > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 16
0
 public bool Insert()
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     this.IdColor = Convert.ToInt32(conexion.ObtenerValorDb("Insert into Colores (Color) values ('" + this.Color + "')Select @@Identity"));
     if (this.IdColor > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 17
0
 public static DataTable Listar(string campos = "*", string filtro = "1=1")
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     return(conexion.BuscarDb("Select " + campos + " from Financiamientos where " + filtro));
 }
Ejemplo n.º 18
0
 public bool Eliminar(int IdBuscado)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Delete from Financiamientos where IdFinanciamiento = " + IdBuscado));
 }
Ejemplo n.º 19
0
 public bool Eliminar(int IdBuscado)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Delete from Personas where IdPersona = " + IdBuscado));
 }
Ejemplo n.º 20
0
 public Boolean Modificar(int IsClient, float Ingreso, string Cedula, string Telefono, string Direccion, string Nombre, string Apellido)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update Personas set IsClient = " + IsClient + ",  Ingreso = " + Ingreso + ",  Cedula ='" + Cedula + "',Telefono ='" + Telefono + "' , Direccion ='" + Direccion + "' ,  Nombre = '" + Nombre + "',  Apellido = '" + Apellido + "' Where IdPersona = " + this.IdPersona + ";"));
 }
Ejemplo n.º 21
0
 public bool Eliminar(int IdBuscado)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Delete from Motores where IdUsuario = " + IdBuscado));
 }
Ejemplo n.º 22
0
 public Boolean Modificar(float BalanceQuota, float Interes, float BalanceInteres, int Quotas)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update CobroDetalles set BalanceQuota = " + BalanceQuota + ",  Interes =" + Interes + ", BalanceInteres = " + BalanceInteres + ", Quotas = " + Quotas + " Where IdCobroDetalle = " + this.IdCobroDetalle + ";"));
 }
Ejemplo n.º 23
0
 public bool Eliminar(int IdBuscado)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Delete from CobroDetalles where IdCobroDetalle = " + IdBuscado));
 }
Ejemplo n.º 24
0
 public Boolean Modificar(float Balance, float Abono)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update Cobros set Balance = " + Balance + ",  Abono =" + Abono + " Where IdCobro = " + this.IdCobro + ";"));
 }
Ejemplo n.º 25
0
 public DataTable Buscar(string campos, string condicion)
 {
     string querry = "select " + campos + " from Profesores where " + condicion;
     DAL.ConexionDb con = new DAL.ConexionDb();
     return con.BuscarDb(querry);
 }
Ejemplo n.º 26
0
 public bool Delete()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     return(con.EjecutarDB("delete from Secciones where= " + IdSeccion));;
 }
Ejemplo n.º 27
0
 public Boolean Modificar(int IdPersona, int IdGarante, int IdMotor, float Balance, int IntervaloPago, float Inicial)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update Financiamientos set IdPersona = " + IdPersona + ",  IdGarante ='" + IdGarante + "',IdMotor ='" + IdMotor + "' , Balance ='" + Balance + "' ,  IntervaloPago = '" + IntervaloPago + "',  Inicial = '" + Inicial + "' Where IdFinanciamiento = " + this.IdFinanciamiento + ";"));
 }
Ejemplo n.º 28
0
 public bool Delete()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     return con.EjecutarDB("delete from Secciones where= " + IdSeccion); ;
 }
Ejemplo n.º 29
0
 public bool Eliminar()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     con.EjecutarDB("delete from Profesores where=" + IdProfesor);
     return true;
 }
Ejemplo n.º 30
0
 public Boolean Modificar(string Fabricante, string Modelo, int IdColor, string NumeroChasis, int AProduccion, float Precio)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update Motores set Fabricante ='" + Fabricante + "', Modelo ='" + Modelo + "', IdColor =" + IdColor + ", NumeroChasis ='" + NumeroChasis + "', AProduccion = " + AProduccion + ", Precio = " + Precio + " Where IdMotor = " + this.IdMotor + ";"));
 }
Ejemplo n.º 31
0
 public bool Eliminar()
 {
     DAL.ConexionDb con = new DAL.ConexionDb();
     con.EjecutarDB("delete from Profesores where=" + IdProfesor);
     return(true);
 }
Ejemplo n.º 32
0
 public static DataTable Listar(string condicion)
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     return(conexion.BuscarDb("select * from Profesores where " + condicion));
 }
Ejemplo n.º 33
0
 public static DataTable Listar(string condicion)
 {
     DAL.ConexionDb conexion = new DAL.ConexionDb();
     return conexion.BuscarDb("select * from Profesores where " + condicion);
 }
Ejemplo n.º 34
0
 public Boolean Modificar(string NombreUsuario, string Nombre, string Contra, string Email)
 {
     DAL.ConexionDb db = new DAL.ConexionDb();
     return(db.EjecutarDB("Update Usuarios set NombreUsuario = '" + NombreUsuario + "',  Nombres ='" + Nombres + "',Contra ='" + Contra + "' , Email ='" + Email + "' Where IdUsuario = " + this.IdUsuario + ";"));
 }