public void CreateNewHelpRequestAssignment(DabDBContext db) { var student = db.Set <StudentEntity>().ToList(); int i = 0; foreach (var x in student) { Console.WriteLine( " Nr:" + i + "\n" + " Student ID " + x.AuId + "\n" + " Student Name: " + x.Name); i++; } Console.WriteLine("Type Nr of the user to request help:"); int id = Convert.ToInt32(Console.ReadLine()); var shadow = db.Set <AssignmentStudentEntity>().ToList(); var assignment = db.Set <AssignmentEntity>().ToList(); i = 0; foreach (var x in assignment) { Console.WriteLine( " Nr:" + i + "\n" + " Exercise Id: " + x.AssignmentId); i++; } Console.WriteLine("Type Nr of the exercise you want help with:"); int assId = Convert.ToInt32(Console.ReadLine()); shadow[assId].NeedHelp = true; }
public void CreateNewHelpRequestExercise(DabDBContext db) { var student = db.Set <StudentEntity>().ToList(); int i = 0; foreach (var x in student) { Console.WriteLine( " Nr: " + i + " Student ID " + x.AuId + " Student Name: " + x.Name); i++; } Console.WriteLine("Type Nr of the user to request help:"); int id = Convert.ToInt32(Console.ReadLine()); var exercise = db.Set <ExerciseEntity>().ToList(); i = 0; foreach (var x in exercise) { Console.WriteLine( " Nr:" + i + " Exercise Name: " + x.Lecture); i++; } Console.WriteLine("Type Nr of the exercise you want help with:"); int exeid = Convert.ToInt32(Console.ReadLine()); exercise[exeid].Student.Name = student[id].Name; Console.WriteLine("Write where you want help:"); exercise[exeid].HelpWhere = Console.ReadLine(); }
private void TeachersView() { var teachers = _db.Set <TeacherEntity>().ToList(); foreach (TeacherEntity x in teachers) { Console.WriteLine("AU ID: " + x.AuId + " Teacher Name: " + x.Name + x.Exercises); } }