Rev | Line | |
---|
[6130] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using System.Web.Mvc;
|
---|
| 6 | using HLWebOKBAdminPlugin.Models;
|
---|
| 7 | using HLWebOKBAdminPlugin.OKBAdministrationService;
|
---|
| 8 |
|
---|
| 9 | namespace HLWebOKBAdminPlugin.Controllers
|
---|
| 10 | {
|
---|
| 11 | /// <summary>
|
---|
| 12 | /// Controller for Problem Submenu
|
---|
| 13 | /// </summary>
|
---|
| 14 | public class ProblemController : Controller
|
---|
| 15 | {
|
---|
| 16 | /// <summary>
|
---|
| 17 | /// Controller for Index View
|
---|
| 18 | /// </summary>
|
---|
| 19 | /// <returns></returns>
|
---|
| 20 | public ActionResult Index()
|
---|
| 21 | {
|
---|
| 22 | Session["SelectedSubMenu"] = "Problem";
|
---|
| 23 | ProblemModel pm = new ProblemModel();
|
---|
| 24 | return View(pm);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | /// <summary>
|
---|
| 28 | /// Controller for Detail View
|
---|
| 29 | /// </summary>
|
---|
| 30 | /// <param name="p"></param>
|
---|
| 31 | /// <returns></returns>
|
---|
| 32 | public ActionResult Detail(long id)
|
---|
| 33 | {
|
---|
| 34 | Session["SelectedSubMenu"] = "Problem";
|
---|
| 35 | // We use here the ProblemMode, but I think
|
---|
| 36 | // we can also use the Problem class. (?)
|
---|
| 37 | ProblemModel pm = new ProblemModel();
|
---|
| 38 | pm.Problem = (Problem)pm.Problems.Where(x => x.Id.Equals(id)).FirstOrDefault();
|
---|
| 39 | return View(pm);
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | }
|
---|
| 43 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.