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; } } }
private bool IsTheSameName(Pupil pupil, string fullName) { return(String.Format($"{pupil.FirstName} {pupil.LastName}") == fullName || String.Format($"{pupil.LastName} {pupil.FirstName}") == fullName); }
public Mark(Pupil pupil, Lesson lesson, string value) { this.pupil = pupil; this.lesson = lesson; Value = value; }