- Timestamp:
- 05/17/11 11:16:41 (14 years ago)
- Location:
- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemController.cs
r6162 r6213 21 21 { 22 22 Session["SelectedSubMenu"] = "Problem"; 23 23 ProblemModel pm = new ProblemModel(); 24 24 return View(pm); 25 25 } … … 43 43 Session["SelectedSubMenu"] = "Problem"; 44 44 ProblemModel pm = new ProblemModel(); 45 pm.Problems = pm.Problems.OrderByDescending(x => x.Name).ToArray<Problem>(); 46 return View("Index",pm); 45 46 //this is code for testing sortorder 47 IOrderedEnumerable<Problem> test = pm.Problems.OrderByDescending(x => x.Name); 48 IList<Problem> test2 = new List<Problem>(); 49 foreach(var item in test) { 50 test2.Add(item); 51 } 52 pm.Problems = test2; 53 54 // this should be the right code 55 //pm.Problems = pm.Problems.OrderByDescending(x => x.Name).ToArray<Problem>(); 56 return View("Index", pm); 47 57 } 48 58 /// <summary> … … 56 66 // We use here the ProblemMode, but I think 57 67 // we can also use the Problem class. (?) 58 68 ProblemModel pm = new ProblemModel(); 59 69 if(id == null) 60 70 pm.Problem = new Problem();
Note: See TracChangeset
for help on using the changeset viewer.