public datosInscripcion(BusinessController control, Student alumno, TaughtCourse tc, Enrollment enrollment) { InitializeComponent(); this.businessControl = control; this.student = alumno; this.tc = tc; this.enroll = enrollment; student = alumno; enroll = enrollment; this.estudianteAnadir = alumno; this.cursoImAnadir = tc; dal = GestAcaDAL.getGestAcaDAL(); nameLabel.Text = alumno.Name; infoIdLabel.Text = alumno.Id; infoAddressLabel.Text = alumno.Address; infoZipCodeLabel.Text = alumno.ZipCode.ToString(); infoIBANLabel.Text = alumno.IBAN; //infoIdEnrollment.Text = enrollment.Id.ToString(); infoCourseLabel.Text = tc.Course.Name; infoIDCourseLabel.Text = tc.Id.ToString(); infoTimesLabel.Text = "During " + tc.TeachingDay.ToString() + " from " + tc.StartDateTime.ToString() + " to " + tc.EndTime.ToString(); infoDurationLabel.Text = tc.SessionDuration.ToString() + " minutes"; infoQuotaLabel.Text = tc.Quota.ToString(); infoTotalPriceLabel.Text = tc.TotalPrice.ToString(); }
public introducirEnrollmentId(BusinessController control, Student alumno, TaughtCourse tcourse) { InitializeComponent(); this.businessControl = control; this.student = alumno; this.Tc = tcourse; student = alumno; this.estudianteAnadir = alumno; this.cursoImAnadir = tcourse; dal = GestAcaDAL.getGestAcaDAL(); }
static void Main(string[] args) { GestAcaDAL dal = GestAcaDAL.getGestAcaDAL(); IStudentDAO estudianteDAO = dal.studentDAO; Console.WriteLine("*** Añadir Estudiante: \n"); Console.WriteLine("introduzca Nombre: "); String nombre = Console.ReadLine(); Console.WriteLine("introduzca DNI: "); String id = Console.ReadLine(); Console.WriteLine("introduzca ZIP: "); int zip = Int32.Parse(Console.ReadLine()); Console.WriteLine("introduzca direccion: "); String direccion = Console.ReadLine(); Console.WriteLine("introduzca IBAN: "); String iban = Console.ReadLine(); Student estudiante = new Student(id, nombre, direccion, zip, iban); estudianteDAO.addStudent(estudiante); Console.WriteLine("Elementos en la base de datos:"); ICollection <Student> listaEstudiantes = estudianteDAO.findAllStudents(); foreach (Student std in listaEstudiantes) { Console.WriteLine("ID: " + std.Id + ", Nombre: " + std.Name + ", Codigo ZIP: " + std.ZipCode); } Console.WriteLine("Pulsa cualquier tecla para salir..."); Console.ReadKey(); }
private BusinessController() { dal = GestAcaDAL.getGestAcaDAL(); }