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
{
///
/// Controller for Problem Submenu
///
public class ProblemController : Controller
{
///
/// Controller for Index View
///
///
public ActionResult Index()
{
Session["SelectedSubMenu"] = "Problem";
ProblemModel pm = new ProblemModel();
return View(pm);
}
///
/// Controller for Detail View
///
///
///
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();
pm.Problem = (Problem)pm.Problems.Where(x => x.Id.Equals(id)).FirstOrDefault();
return View(pm);
}
}
}