public AddResult(int userId) { InitializeComponent(); _eloquentStudentRepository = new EloquentStudentRepository(); UserId = userId; _student = _eloquentStudentRepository.GetStudentDetails(UserId); lblLevel.Text = String.Format("Level : {0}L", Data.DataSingleton.CreateDataContext().LevelTables.First(l => l.id == _student.Level).level); lblSemester.Text = String.Format("Semester : {0}", Data.DataSingleton.CreateDataContext().SemesterTables.First(l => l.id == _student.Semester).name.ToUpper()); }
public Dashboard(int userId) { InitializeComponent(); UserId = userId; _eloquentStudentRepository = new EloquentStudentRepository(); _student = _eloquentStudentRepository.GetStudentDetails(UserId); lblSignin.Text = @"Signin in with matric number : " + _student.MatricNumber; lblMatric.Text = String.Format("Matric Number: {0}", _student.MatricNumber); lblLevel.Text = String.Format("Level : {0}L", Data.DataSingleton.CreateDataContext().LevelTables.First(l => l.id == _student.Level).level); lblSemester.Text = String.Format("Semester : {0}", Data.DataSingleton.CreateDataContext() .SemesterTables.First(l => l.id == _student.Semester) .name.ToUpper()); LoadResult(); LoadFormerResult(); LoadForwardResult(); }