示例#1
0
        public List <Tutor_SearchSelect_Result> TutorFilter(string searchName = "", int GradId = 0, int OblastId = 0)
        {
            //Magic string(ne vvalja koristit mogo bi biti bug)
            if (searchName == "Empty")
            {
                searchName = null;
            }
            if (GradId == 0)
            {
                if (OblastId == 0)
                {
                    return(db.tps_Tutor_SearchSelect(searchName, null, null).ToList());
                }
                return(db.tps_Tutor_SearchSelect(searchName, null, OblastId).ToList());
            }

            else if (OblastId == 0)
            {
                return(db.tps_Tutor_SearchSelect(searchName, GradId, null).ToList());
            }



            return(db.tps_Tutor_SearchSelect(searchName, GradId, OblastId).ToList());
        }