Esempio n. 1
0
 public void AddOrDelete(BindableCollection <CourseModel> courses)
 {
     //TODO - add validation
     foreach (var item in courses)
     {
         if (item.IsSelected == true)
         {
             _sqlData.InsertFutureCourse(UserName, item.CourseId, _major.MajorId);
         }
         else if (item.IsSelected == false)
         {
             _sqlData.RemoveFutureCourse(UserName, item.CourseId, _major.MajorId);
         }
     }
 }