Beispiel #1
0
 async void AddReviewBtn_Clicked(object sender, EventArgs e)
 {
     if (subprof)
     {
         Subject subject  = EntityLoader.subjects.Find(s => s.Id == id);
         var     nextPage = new AddReview(subject);
         nextPage.AddedReview += UpdateReviewList;
         await Navigation.PushAsync(nextPage);
     }
     else
     {
         Lecturer lecturer = EntityLoader.lecturers.Find(l => l.Id == id);
         var      nextPage = new AddReview(lecturer);
         nextPage.AddedReview += UpdateReviewList;
         await Navigation.PushAsync(nextPage);
     }
 }
Beispiel #2
0
 async void EditReviewBtn_Clicked(object sender, EventArgs e)
 {
     if (subprof)
     {
         SubjectReview review   = EntityLoader.GetUserReviewsS().Find(sr => sr.SubjectId == id);
         Subject       subject  = EntityLoader.subjects.Find(s => s.Id == id);
         var           nextPage = new AddReview(subject, review);
         nextPage.AddedReview += UpdateReviewList;
         await Navigation.PushAsync(nextPage);
     }
     else
     {
         LecturerReview review   = EntityLoader.GetUserReviewsL().Find(lr => lr.LecturerId == id);
         Lecturer       lecturer = EntityLoader.lecturers.Find(l => l.Id == id);
         var            nextPage = new AddReview(lecturer, review);
         nextPage.AddedReview += UpdateReviewList;
         await Navigation.PushAsync(nextPage);
     }
 }