예제 #1
0
        public DataTable selectByClass(int selectClass, int selectExam, bool selectByGirl, bool selectByBoy, bool selectAll, bool selectClassBool = false, bool selectExamBool = false)
        {
            int sex = 0;

            if (selectClassBool && (selectByBoy || selectByGirl))
            {
                sex = selectByBoy ? 0 : 1;
                return(user.selectClassSex(selectClass, sex));
            }
            else if (selectExamBool && (selectByBoy || selectByGirl))
            {
                sex = selectByBoy ? 0 : 1;
                return(user.selectExamSex(selectExam, sex));
            }
            else if (selectClassBool && selectAll)
            {
                return(user.selectClass(selectClass));
            }
            else if (selectExamBool && selectAll)
            {
                return(user.selectExam(selectExam));
            }
            else if ((selectByBoy || selectByGirl))
            {
                sex = selectByBoy ? 0 : 1;
                return(user.selectSex(sex));
            }
            else
            {
                return(user.selectAll());
            }
        }