private void SubjectDetailUserControl_Loaded(object sender, RoutedEventArgs e)
 {
     if(FormMode != FormModes.New)
     {
          SubjectDetail = _subjectRepository.FindByID(_subjectID);
     }
 }
 private void OpenSubjectDetailWindow(string mode, string title)
 {
     var win = GetSelectedSubject();
     
     if (win == null && mode != FormModes.New)
     {
         Message(MessageTypes.Error, "Please Select to " + mode + " Staff Detail");
         return;
     }
     if(FormModes.New == mode)
     {
         win = new Subject();
     }
     var view = new ucSubjectDetailView(mode, win.SubjectID);
     view.ParentContainer = this;
     OpenPopUp(view, title, 400, 300);
 }
 public void AddToList(Subject sub)
 {
     SubjectList = SubjectList.Add(sub);
 }