Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/17/11 11:16:41 (14 years ago)
Author:
gschwarz
Message:

#1433 Updated Problem Control/View; Added Algorithm Control/View => bug still exist in SortDesc

Location:
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemController.cs

    r6162 r6213  
    2121        {
    2222            Session["SelectedSubMenu"] = "Problem";
    23       ProblemModel pm = new ProblemModel();
     23            ProblemModel pm = new ProblemModel();
    2424      return View(pm);
    2525    }
     
    4343            Session["SelectedSubMenu"] = "Problem";
    4444            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);
    4757        }
    4858        /// <summary>
     
    5666            // We use here the ProblemMode, but I think
    5767            // we can also use the Problem class. (?)
    58       ProblemModel pm = new ProblemModel();
     68            ProblemModel pm = new ProblemModel();
    5969            if(id == null)
    6070                pm.Problem = new Problem();
Note: See TracChangeset for help on using the changeset viewer.