Exemple #1
0
        private void Merge(Pupil pupil, Pupil newPupil)
        {
            if (pupil.TrueName == null && newPupil.TrueName != null)
            {
                pupil.TrueName = newPupil.TrueName;
                return;
            }

            if (pupil.TrueName == newPupil.TrueName)
            {
                return;
            }

            if (pupil.TrueName != null && newPupil.TrueName != null)
            {
                if (MessageBox.Show($"{pupil.TrueName} or {newPupil.TrueName}. First! If not, press No", "", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    pupil.TrueName = newPupil.TrueName;
                }
            }
        }
Exemple #2
0
 private bool IsTheSameName(Pupil pupil, string fullName)
 {
     return(String.Format($"{pupil.FirstName} {pupil.LastName}") == fullName ||
            String.Format($"{pupil.LastName} {pupil.FirstName}") == fullName);
 }
Exemple #3
0
 public Mark(Pupil pupil, Lesson lesson, string value)
 {
     this.pupil  = pupil;
     this.lesson = lesson;
     Value       = value;
 }