Exemplo n.º 1
0
        public void sAddTeacher(string name, string cnic, string gender, string email, string mobile_no, string address, string date_of_birth, string joing_date, string employee_no, List <string> courses_assigned)
        {
            Teacher teacher = new Teacher();

            teacher.Name          = name;
            teacher.Cnic          = cnic;
            teacher.Gender        = gender;
            teacher.Email         = email;
            teacher.Mobile_no     = mobile_no;
            teacher.Address       = address;
            teacher.Date_of_birth = date_of_birth;
            teacher.Joining_date  = joing_date;
            teacher.Employee_no   = employee_no;
            foreach (string courName in courses_assigned)
            {
                foreach (Course c in CoursesDataClass.Courses)
                {
                    if (c.Title == courName)
                    {
                        teacher.addCourse(c);
                        c.Teacher = teacher;
                    }
                }
            }
            EmployeesDataClass.addTeacher(teacher);
        }
Exemplo n.º 2
0
        public void sChangeLibrarian(string name, string cnic, string gender, string email, string mobile_no, string address, string date_of_birth, string joing_date, string employee_no)
        {
            Librarian librarian = new Librarian();

            librarian.Name          = name;
            librarian.Cnic          = cnic;
            librarian.Gender        = gender;
            librarian.Email         = email;
            librarian.Mobile_no     = mobile_no;
            librarian.Address       = address;
            librarian.Date_of_birth = date_of_birth;
            librarian.Joining_date  = joing_date;
            librarian.Employee_no   = employee_no;
            EmployeesDataClass.changeLibrarian(librarian);
        }