private void getTerm(string[] tempArray) { string term = tempArray[0]; string classString = tempArray[1]; string[] classes = classString.Split("<dn>"); int itemCount = 0; thisTerm = _termRepository.DestringifyTermObject(term); foreach (string item in classes) { if (item != "\n" && item != "," && item != " " && item != "") { var temp = _classRepository.DeStringifyObject(item); classesList.Add(temp); switch (itemCount) { case 0: Class1 = temp.Id + ":" + temp.InstructorId; itemCount++; break; case 1: Class2 = temp.Id + ":" + temp.InstructorId; itemCount++; break; case 2: Class3 = temp.Id + ":" + temp.InstructorId; itemCount++; break; case 3: Class4 = temp.Id + ":" + temp.InstructorId; itemCount++; break; case 4: Class5 = temp.Id + ":" + temp.InstructorId; itemCount++; break; case 5: Class6 = temp.Id + ":" + temp.InstructorId; itemCount++; break; } } } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.DisplayClass); var myIntent = Intent; tempStringClass = myIntent.GetStringExtra("classObject"); tempStringInstructor = myIntent.GetStringExtra("instructorObject"); tempObj = tempRepository.DeStringifyObject(tempStringClass); tempRepository.LoadClasses(); tempInstructor = tempInstructorRepository.DeStringifyInstructorObject(tempStringInstructor); FillForm(); // Create your application here }