public void RegisterStudent() { Console.WriteLine("Registering of a new student"); Console.Write("Type his/her name : "); string name = Console.ReadLine(); Console.Write("Type his/her adress : "); string adress = Console.ReadLine(); Console.Write("Type his/her phone number : "); string phoneNumber = Console.ReadLine(); Console.Write("Type his/her email : "); string email = Console.ReadLine(); Console.Write("Type his/her password : "******"Type the name of his/her branch : "); string branchName = Console.ReadLine(); Console.Write("Type the number of payments : "); int nbrPayment = Convert.ToInt32(Console.ReadLine()); int index = Branches.IndexOfKey(branchName); Branche branche = Branches.ElementAt(index).Value; Student student = new Student(name, adress, phoneNumber, email, password, branche, nbrPayment, 0, 0, 0, AllCourses[index], AllCourses[index].Count); AllStudents.Add(student); }
public List <Student> Display(List <DataStudent> concat) { List <Student> finalList = new List <Student>(); foreach (DataStudent s in concat) { finalList.Add((Student)users[s.username]); } AllStudents.Add(Student_to_match); return(finalList); }
public Student() { AllStudents.Add(this); }