Exemple #1
0
        public static List <TeacherDTO> searchTeacher(string textToSearch, string schoolYear, string position)
        {
            List <TeacherDTO> result = AcademicAffairsOfficeDAO.searchTeacher(textToSearch, schoolYear, position);

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    string birthDay = result[i].DateofBith;
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;

                    if (position == "System.Windows.Controls.ComboBoxItem: All")
                    {
                        if (result[i].Type == "PDT")
                        {
                            result[i].NamePosition = "Academic Affair Offfice Staff";
                        }
                        else if (AcademicAffairsOfficeDAO.isMaster(result[i].Id, Global.schoolYear))
                        {
                            result[i].NamePosition = "Homeroom Teacher";
                        }
                        else
                        {
                            result[i].NamePosition = "Subject Teacher";
                        }
                    }
                }
                return(result);
            }
            return(null);
        }
Exemple #2
0
        public static List <TeacherDTO> loadListTeacher()
        {
            List <TeacherDTO> result = AcademicAffairsOfficeDAO.loadListTeacher();

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    if (result[i].Type == "PDT")
                    {
                        result[i].NamePosition = "Academic Affair Offfice Staff";
                    }
                    else if (AcademicAffairsOfficeDAO.isMaster(result[i].Id, Global.schoolYear))
                    {
                        result[i].NamePosition = "Homeroom Teacher";
                    }
                    else
                    {
                        result[i].NamePosition = "Subject Teacher";
                    }

                    string birthDay = result[i].DateofBith;
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;
                }
                return(result);
            }
            return(null);
        }
Exemple #3
0
        public static List <StudentDTO> loadListStudent(string nameClass, string SchoolYear)
        {
            var result = AcademicAffairsOfficeDAO.LoadStudent(nameClass, SchoolYear);
            int n      = result.Count;

            for (int i = 0; i < n; i++)
            {
                string temp = result[i].DateofBith;
                TeacherBUS.StandalizedBirthDayToUI(ref temp);
                result[i].DateofBith = temp;
            }
            return(result);
        }
Exemple #4
0
        public static List <TeacherDTO> loadListSubjectTeacher(string schoolYear)
        {
            List <TeacherDTO> result = AcademicAffairsOfficeDAO.loadListSubjectTeacher(schoolYear);

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    string birthDay = result[i].DateofBith;
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;
                }
                return(result);
            }
            return(null);
        }
Exemple #5
0
        public static List <StudentDTO> LoadStudent(string nameClass, string schoolYear, string status)
        {
            List <StudentDTO> result = AcademicAffairsOfficeDAO.LoadStudent(nameClass, schoolYear, status);

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    string birthDay = result[i].DateofBith;
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;
                }
                return(result);
            }
            return(null);
        }
Exemple #6
0
        public static List <PeopleDTO> loadListTeacher(string status)
        {
            List <PeopleDTO> result = AdminDAO.loadListTeacher(status);

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    string birthDay = result[i].DateofBith.ToString();
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;
                }
                return(result);
            }
            return(null);
        }
Exemple #7
0
        public static List <PeopleDTO> searchUser(string authories, string status, string textToSearch)
        {
            List <PeopleDTO> result = AdminDAO.searchUser(authories, status, textToSearch);

            if (result != null)
            {
                int n = result.Count;
                for (int i = 0; i < n; i++)
                {
                    string birthDay = result[i].DateofBith.ToString();
                    TeacherBUS.StandalizedBirthDayToUI(ref birthDay);
                    result[i].DateofBith = birthDay;
                }
                return(result);
            }
            return(null);
        }
Exemple #8
0
        public static List <StudentDTO> searchStudent(string textToSearch, string nameClass, string schoolYear)
        {
            var result = AcademicAffairsOfficeDAO.searchStudent(textToSearch, nameClass, schoolYear);

            if (result == null)
            {
                return(null);
            }
            int n = result.Count;

            for (int i = 0; i < n; i++)
            {
                string temp = result[i].DateofBith;
                TeacherBUS.StandalizedBirthDayToUI(ref temp);
                result[i].DateofBith = temp;
            }
            return(result);
        }