TRManager.Student.getSurname C# (CSharp) Method

getSurname() public method

public getSurname ( ) : String
return String
        public String getSurname()
        {
            return this.surname;
        }

Usage Example

        /// <summary>
        /// This method checks how much incidents a student has. If he has 3 or 5 a message will pop up.
        /// </summary>
        /// <param name="s">A student's object</param>
        private void checkStudentIncidentCount(Student s)
        {
            int studentIncidentCount = UtilityDB.getStudentIncidents(studentID).Count;

            if (studentIncidentCount == 3)
            {
                MessageBox.Show(s.getGivenName() + " " + s.getSurname() + " ist bereits zum 3. Mal im Trainingsraum. Ein Elterngespräch ist notwendig.", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            if (studentIncidentCount == 5)
            {
                MessageBox.Show(s.getGivenName() + " " + s.getSurname() + " ist bereits zum 5. Mal im Trainingsraum. Eine Klassenkonferenz ist notwendig.", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }