예제 #1
0
        //Classroom
        public Classroom AddClassroom(string name)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new NullReferenceException();
            }

            if (_listclassroom.ContainsKey(name))
            {
                throw new ArgumentException();
            }

            Classroom classroom = new Classroom(name, this);
            _listclassroom.Add(name, classroom);
            return classroom;
        }
예제 #2
0
        public bool RemoveClassroom(Classroom c)
        {
            if (c == null)
                throw new ArgumentException();

            string name = c.Name;

            if (_listpromotion.ContainsKey(name))
            {
                _listpromotion.Remove(name);
                return true;
            }
            else
            {
                return false;
            }
        }