Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AlgorithmClassController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AlgorithmClassController.cs	(revision 6279)
+++ 	(revision )
@@ -1,104 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using HLWebOKBAdminPlugin.Models;
-using HLWebOKBAdminPlugin.OKBAdministrationService;
-
-namespace HLWebOKBAdminPlugin.Controllers
-{
-    public class AlgorithmClassController : Controller
-    {
-        //
-        // GET: /AlgorithmClass/
-
-        public ActionResult Index()
-        {
-            Session["SelectedSubMenu"] = "AlgorithmClass";
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-            return View(acm);
-        }//Index
-
-        public ActionResult Detail(long? id) {
-            Session["SelectedSubMenu"] = "AlgorithmClass";
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-
-            if (id == null)
-                acm.AlgorithmClass = new AlgorithmClass();
-            else
-                acm.AlgorithmClass = (AlgorithmClass)acm.AlgorithmClasses.Where(x => x.Id.Equals((long)id)).FirstOrDefault();
-            return View(acm);
-        }//Detail
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult Delete(long? id) {
-            Session["SelectedSubMenu"] = "AlgorithmClass";
-
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-            if (id != 0) {
-                acm.DeleteAlgorithmClass((long)id);
-            }
-            return View("Index", acm);
-        }//Delete
-
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SaveChanges(FormCollection collection) {
-            long algorithmClassId = long.Parse(collection.Get("AlgorithmClassId"));
-            String algorithmClassName = collection.Get("AlgorithmClassName");
-            String algorithmClassDescription = collection.Get("AlgorithmClassDescription");
-
-            // Later, we will get the runs from the session ...
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-            if (algorithmClassId != 0)
-                acm.AlgorithmClass = (AlgorithmClass)acm.AlgorithmClasses.Where(x => x.Id.Equals(algorithmClassId)).FirstOrDefault();
-
-            acm.AlgorithmClass.Name = algorithmClassName;
-            acm.AlgorithmClass.Description = algorithmClassDescription;
-
-            acm.SaveAlgorithmClass(acm.AlgorithmClass);
-
-            return View("Index", acm);
-        }//SaveChanges
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortAsc() {
-            Session["SelectedSubMenu"] = "AlgorithmClass";
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-            acm.AlgorithmClasses = acm.AlgorithmClasses.OrderBy(x => x.Name).ToList<AlgorithmClass>();
-            return View("Index", acm);
-        }
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortDesc() {
-            Session["SelectedSubMenu"] = "AlgorithmClass";
-            AlgorithmClassModel acm = new AlgorithmClassModel();
-
-            IOrderedEnumerable<AlgorithmClass> acmOrderedList = acm.AlgorithmClasses.OrderByDescending(x => x.Name);
-            IList<AlgorithmClass> acmList = new List<AlgorithmClass>();
-            foreach (var item in acmOrderedList) {
-                acmList.Add(item);
-            }
-            acm.AlgorithmClasses = acmList;
-
-            // this should be the right code
-            //pm.Problems = pm.Problems.OrderByDescending(x => x.Name).ToArray<Problem>();
-            return View("Index", acm);
-        }
-
-    }
-}
-
-    
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AlgorithmController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AlgorithmController.cs	(revision 6279)
+++ 	(revision )
@@ -1,145 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using HLWebOKBAdminPlugin.Models;
-using HLWebOKBAdminPlugin.OKBAdministrationService;
-using System.IO;
-
-namespace HLWebOKBAdminPlugin.Controllers
-{
-    /// <summary>
-    /// Controller for Algorithm Submenu
-    /// </summary>
-	public class AlgorithmController : Controller
-	{
-		/// <summary>
-		/// Controller for Index View
-		/// </summary>
-		/// <returns></returns>
-		public ActionResult Index()
-        {
-            Session["SelectedSubMenu"] = "Algorithm";
-            AlgorithmModel pm = new AlgorithmModel();
-			return View(pm);
-		}
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortAsc() {
-            Session["SelectedSubMenu"] = "Algorithm";
-            AlgorithmModel pm = new AlgorithmModel();
-            pm.Algorithms = pm.Algorithms.OrderBy(x => x.Name).ToList<Algorithm>();
-            return View("Index",pm);
-        }
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortDesc() {
-            Session["SelectedSubMenu"] = "Algorithm";
-            AlgorithmModel pm = new AlgorithmModel();
-            pm.Algorithms = pm.Algorithms.OrderByDescending(x => x.Name).ToArray<Algorithm>();
-            return View("Index",pm);
-        }
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-		public ActionResult Detail(long? id)
-        {
-            Session["SelectedSubMenu"] = "Algorithm";
-            // We use here the AlgorithmMode, but I think
-            // we can also use the Algorithm class. (?)
-            AlgorithmModel pm = new AlgorithmModel();
-            if(id == null)
-                pm.Algorithm = new Algorithm();
-            else
-                pm.Algorithm = (Algorithm)pm.Algorithms.Where(x => x.Id.Equals((long)id)).FirstOrDefault();
-			return View(pm);
-		}
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult Delete(long id) {
-            Session["SelectedSubMenu"] = "Algorithm";
-            // We use here the AlgorithmMode, but I think
-            // we can also use the Algorithm class. (?)
-            AlgorithmModel pm = new AlgorithmModel();
-            if(id != 0) {
-                pm.DeleteAlgorithm(id);
-            }
-            return View("Index", pm);
-        }
-
-        public ActionResult UploadFile(FormCollection collection) {
-            Session["SelectedSubMenu"] = "Algorithm";
-
-            long algorithmId = long.Parse(collection.Get("AlgorithmId"));
-
-            AlgorithmModel pm = new AlgorithmModel();
-
-            foreach (string inputTagName in Request.Files) {
-                HttpPostedFileBase file = Request.Files[inputTagName];
-                if (file.ContentLength > 0) {
-                    // maybe for storage on server
-                    //string filePath = Path.Combine(HttpContext.Server.MapPath("../Uploads"), Path.GetFileName(file.FileName));
-                    if (file.InputStream.CanRead) {
-                        //file length
-                        int fileLength = file.ContentLength;
-
-                        //bytearray
-                        byte[] data = new byte[fileLength];
-
-                        //initialize input stream
-                        Stream dataStream = file.InputStream;
-
-                        //read file into byte array
-                        dataStream.Read(data, 0, fileLength);
-
-                        //save data
-                        pm.UpdateAlgorithmData(algorithmId, data);
-                    }//if
-                }
-            }//foreach
-
-            return View("Index", pm);
-        }//UploadFile
-
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SaveChanges(FormCollection collection) {            
-            long algorithmId = long.Parse(collection.Get("AlgorithmId"));
-            String algorithmName = collection.Get("AlgorithmName");
-            String algorithmDescription = collection.Get("AlgorithmDescription");
-            String algorithmDataTypeName = collection.Get("AlgorithmDataTypeName");
-            long algorithmClassId = long.Parse(collection.Get("AlgorithmClassId"));
-            long platformId = long.Parse(collection.Get("PlatformId"));
-
-            // Later, we will get the runs from the session ...
-            AlgorithmModel pm = new AlgorithmModel();
-            if(algorithmId != 0)
-                pm.Algorithm = (Algorithm)pm.Algorithms.Where(x => x.Id.Equals(algorithmId)).FirstOrDefault();
-
-            pm.Algorithm.Name = algorithmName;
-            pm.Algorithm.Description = algorithmDescription;
-            pm.Algorithm.DataTypeName = algorithmDataTypeName;
-            pm.Algorithm.DataTypeTypeName = "";
-            pm.Algorithm.AlgorithmClassId = algorithmClassId;
-            pm.Algorithm.PlatformId = platformId;
-
-            pm.SaveAlgorithm(pm.Algorithm);
-
-            return View("Index",pm);
-        }
-	}
-}
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/HomeController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/HomeController.cs	(revision 6279)
+++ 	(revision )
@@ -1,26 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-
-namespace HLWebOKBAdminPlugin.Controllers
-{
-    [HandleError]
-    public class HomeController : Controller
-    {
-        //
-        // GET: /Home/
-
-        public ActionResult Index()
-        {
-            ViewData["Message"] = "Welcome to ASP.NET MVC!";
-            return View();
-        }
-
-        public ActionResult About() {
-            return View();
-        }
-
-    }
-}
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemClassController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemClassController.cs	(revision 6279)
+++ 	(revision )
@@ -1,106 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using HLWebOKBAdminPlugin.Models;
-using HLWebOKBAdminPlugin.OKBAdministrationService;
-
-
-namespace HLWebOKBAdminPlugin.Controllers
-{
-    // <summary>
-    // Controller for ProblemClass Submenu
-    // </summary>
-    public class ProblemClassController : Controller
-    {
-        //
-        // GET: /ProblemClass/
-
-        public ActionResult Index()
-        {
-            Session["SelectedSubMenu"] = "ProblemClass";
-            ProblemClassModel pcm = new ProblemClassModel();
-            return View(pcm);
-        }//Index
-
-        public ActionResult Detail(long? id) {
-            Session["SelectedSubMenu"] = "ProblemClass";
-            ProblemClassModel pcm = new ProblemClassModel();
-
-            if (id == null)
-                pcm.ProblemClass = new ProblemClass();
-            else
-                pcm.ProblemClass = (ProblemClass)pcm.ProblemClasses.Where(x => x.Id.Equals((long)id)).FirstOrDefault();
-            return View(pcm);
-        }//Detail
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult Delete(long? id) {
-            Session["SelectedSubMenu"] = "ProblemClass";
-
-            ProblemClassModel pcm = new ProblemClassModel();
-            if (id != 0) {
-                pcm.DeleteProblemClass((long)id);
-            }
-            return View("Index", pcm);
-        }//Delete
-
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SaveChanges(FormCollection collection) {
-            long problemClassId = long.Parse(collection.Get("ProblemClassId"));
-            String problemClassName = collection.Get("ProblemClassName");
-            String problemClassDescription = collection.Get("ProblemClassDescription");
-
-            // Later, we will get the runs from the session ...
-            ProblemClassModel pcm = new ProblemClassModel();
-            if (problemClassId != 0)
-                pcm.ProblemClass = (ProblemClass)pcm.ProblemClasses.Where(x => x.Id.Equals(problemClassId)).FirstOrDefault();
-
-            pcm.ProblemClass.Name = problemClassName;
-            pcm.ProblemClass.Description = problemClassDescription;
-
-            pcm.SaveProblemClass(pcm.ProblemClass);
-
-            return View("Index", pcm);
-        }//SaveChanges
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortAsc() {
-            Session["SelectedSubMenu"] = "ProblemClass";
-            ProblemClassModel pcm = new ProblemClassModel();
-            pcm.ProblemClasses = pcm.ProblemClasses.OrderBy(x => x.Name).ToList<ProblemClass>();
-            return View("Index", pcm);
-        }
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortDesc() {
-            Session["SelectedSubMenu"] = "ProblemClass";
-            ProblemClassModel pcm = new ProblemClassModel();
-
-            IOrderedEnumerable<ProblemClass> pcmOrderedList = pcm.ProblemClasses.OrderByDescending(x => x.Name);
-            IList<ProblemClass> pcmList = new List<ProblemClass>();
-            foreach (var item in pcmOrderedList) {
-                pcmList.Add(item);
-            }
-            pcm.ProblemClasses = pcmList;
-
-            // this should be the right code
-            //pm.Problems = pm.Problems.OrderByDescending(x => x.Name).ToArray<Problem>();
-            return View("Index", pcm);
-        }
-
-    }
-}
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemController.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/ProblemController.cs	(revision 6279)
+++ 	(revision )
@@ -1,155 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using HLWebOKBAdminPlugin.Models;
-using HLWebOKBAdminPlugin.OKBAdministrationService;
-using System.IO;
-
-namespace HLWebOKBAdminPlugin.Controllers
-{
-    /// <summary>
-    /// Controller for Problem Submenu
-    /// </summary>
-	public class ProblemController : Controller
-	{
-		/// <summary>
-		/// Controller for Index View
-		/// </summary>
-		/// <returns></returns>
-		public ActionResult Index()
-        {
-            Session["SelectedSubMenu"] = "Problem";
-            ProblemModel pm = new ProblemModel();
-			return View(pm);
-		}
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortAsc() {
-            Session["SelectedSubMenu"] = "Problem";
-            ProblemModel pm = new ProblemModel();
-            pm.Problems = pm.Problems.OrderBy(x => x.Name).ToList<Problem>();
-            return View("Index",pm);
-        }
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SortDesc() {
-            Session["SelectedSubMenu"] = "Problem";
-            ProblemModel pm = new ProblemModel();
-
-            //this is code for testing sortorder
-            IOrderedEnumerable<Problem> test = pm.Problems.OrderByDescending(x => x.Name);
-            IList<Problem> test2 = new List<Problem>();
-            foreach(var item in test) {
-                test2.Add(item);
-            }
-            pm.Problems = test2;
-
-            // this should be the right code
-            //pm.Problems = pm.Problems.OrderByDescending(x => x.Name).ToArray<Problem>();
-            return View("Index", pm);
-        }
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-		public ActionResult Detail(long? id)
-        {
-            Session["SelectedSubMenu"] = "Problem";
-            // We use here the ProblemMode, but I think
-            // we can also use the Problem class. (?)
-            ProblemModel pm = new ProblemModel();
-            if(id == null)
-                pm.Problem = new Problem();
-            else
-                pm.Problem = (Problem)pm.Problems.Where(x => x.Id.Equals((long)id)).FirstOrDefault();
-			return View(pm);
-		}
-
-        /// <summary>
-        /// Controller for Index View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult Delete(long id) {
-            Session["SelectedSubMenu"] = "Problem";
-            // We use here the ProblemMode, but I think
-            // we can also use the Problem class. (?)
-            ProblemModel pm = new ProblemModel();
-            if(id != 0) {
-                pm.DeleteProblem(id);
-            }
-            return View("Index", pm);
-        }
-        
-        public ActionResult UploadFile(FormCollection collection) {
-            Session["SelectedSubMenu"] = "Problem";
-
-            long problemId = long.Parse(collection.Get("ProblemId"));           
-
-            ProblemModel pm = new ProblemModel();
-
-            foreach (string inputTagName in Request.Files) {
-                HttpPostedFileBase file = Request.Files[inputTagName];
-                if (file.ContentLength > 0) {
-                    // maybe for storage on server
-                    //string filePath = Path.Combine(HttpContext.Server.MapPath("../Uploads"), Path.GetFileName(file.FileName));
-                    if (file.InputStream.CanRead) {
-                        //file length
-                        int fileLength = file.ContentLength;
-
-                        //bytearray
-                        byte[] data = new byte[fileLength];
-
-                        //initialize input stream
-                        Stream dataStream = file.InputStream;
-
-                        //read file into byte array
-                        dataStream.Read(data, 0, fileLength);
-
-                        //save data
-                        pm.UpdateProblemData(problemId, data);
-                    }//if
-                }
-            }//foreach
-
-            return View("Index", pm);
-        }//UploadFile
-
-        /// <summary>
-        /// Controller for Detail View
-        /// </summary>
-        /// <returns></returns>
-        public ActionResult SaveChanges(FormCollection collection) {            
-            long problemId = long.Parse(collection.Get("ProblemId"));
-            String problemName = collection.Get("ProblemName");
-            String problemDescription = collection.Get("ProblemDescription");
-            String problemDataTypeName = collection.Get("ProblemDataTypeName");
-            long problemClassId = long.Parse(collection.Get("ProblemClassId"));
-            long platformId = long.Parse(collection.Get("PlatformId"));
-
-            // Later, we will get the runs from the session ...
-            ProblemModel pm = new ProblemModel();
-            if(problemId != 0)
-                pm.Problem = (Problem)pm.Problems.Where(x => x.Id.Equals(problemId)).FirstOrDefault();
-
-            pm.Problem.Name = problemName;
-            pm.Problem.Description = problemDescription;
-            pm.Problem.DataTypeName = problemDataTypeName;
-            pm.Problem.DataTypeTypeName = "";
-            pm.Problem.ProblemClassId = problemClassId;
-            pm.Problem.PlatformId = platformId;
-
-            pm.SaveProblem(pm.Problem);
-
-            return View("Index",pm);
-        }
-	}
-}
