Example #1
0
        protected void btnBorrar_Click(object sender, EventArgs e)
        {
            int Id = Convert.ToInt32(lblID.Text);

            Logica.Profesor objLogica = new Logica.Profesor();
            objLogica.Eliminar(Id);
            objLogica.TraerTodos();
        }
Example #2
0
        static void Main(string[] args)
        {
            Entidades.Profesor objEntidadProfesor = new Entidades.Profesor();
            Console.Write("Ingrese su apellido: ");
            objEntidadProfesor.Apellido = Console.ReadLine();
            Console.Write("Ingrese su nombre: ");
            objEntidadProfesor.Nombre = Console.ReadLine();
            Console.Write("Ingrese su mail: ");
            objEntidadProfesor.Mail = Console.ReadLine();

            Logica.Profesor objLogicaProfesor = new Logica.Profesor();
            objLogicaProfesor.Agregar(objEntidadProfesor);
            Console.WriteLine("¡Profesor agregado!");
            Console.ReadKey();
        }
Example #3
0
        static void Main(string[] args)
        {
            Entidades.Profesor objEntidadProfesor = new Entidades.Profesor();

            Console.Write("Ingrese Apellido: ");
            objEntidadProfesor.Apellido = Console.ReadLine();

            Console.Write("Ingrese Nombre: ");
            objEntidadProfesor.Nombre = Console.ReadLine();

            Console.Write("Ingrese Email: ");
            objEntidadProfesor.Email = Console.ReadLine();

            Logica.Profesor objLogicaProfesor = new Logica.Profesor();
            objLogicaProfesor.Agregar(objEntidadProfesor);

            Console.WriteLine("Profesor agregado exitosamente");

            Console.ReadKey();
        }
Example #4
0
 public void TraerTodos()
 {
     Logica.Profesor objLogica = new Logica.Profesor();
     gvProfesores.DataSource = objLogica.TraerTodos();
     gvProfesores.DataBind();
 }