private bool ResultTeacherFilter(object item)
        {
            // ItemCollection myresult = resultgrid.Items;
            TeacherStep2 customer = item as TeacherStep2;

            bool resultat = customer.FirstName.ToLower().Contains(PeopleName.Text.ToLower());

            if (!resultat)
            {
                resultat = customer.LastName.ToLower().Contains(PeopleName.Text.ToLower());
            }
            return(resultat);
        }
Beispiel #2
0
        private void AddNewRecord()
        {
            if (IsTeacher == true)
            {
                TeacherStep2 myteacher = new TeacherStep2()
                {
                    FirstName = FirstName,
                    LastName  = LastName,
                    Email     = Email,
                    Course    = Course,
                    IsTeacher = true
                    ,
                    District             = District,
                    Pair                 = Pair,
                    Phone                = Phone,
                    School               = School,
                    SchoolPhone          = SchoolPhone,
                    Schedule             = TeachSchedule,
                    Room                 = Room,
                    PreferredContact     = PreferredContact,
                    NoSchedulingDay      = "",
                    ClassBackToBack      = "",
                    AttendMentorMatching = ""
                };
                Response = "false";
                Task <string> addresponse = _dataService.AddTeacherStep2(myteacher);
                Response = addresponse.Result;
            }
            else
            {
                StudentStep2 mystudent = new StudentStep2()
                {
                    FirstName = FirstName,
                    LastName  = LastName,
                    Email     = Email,
                    Major     = Major,
                    IsTeacher = false
                    ,
                    Phone            = Phone,
                    Address          = Address,
                    AlternativePhone = AlternativePhone,
                    Schedule         = Schedule,
                    Transportation   = Transportation
                    ,
                    BilingualClass = "",
                    Section        = "",

                    WillingToDrive         = Drive,
                    WillingToTeach         = Teaching,
                    PreferredDays          = PreferredDays,
                    Year                   = Year,
                    Campus                 = Campus,
                    Town                   = Town,
                    DistrictDenton         = DentonDistrict,
                    DistrictForthWorth     = ForthWorthDistrict,
                    DistrictLewisville     = LewisvilleDistrict,
                    DistrictMckinney       = MckinneyDistrict,
                    AnythingElseScheduling = ""
                };
                Response = "false";
                Task <string> addresponse = _dataService.AddStudentStep2(mystudent);
                Response = addresponse.Result;
            }
        }