Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AdminController.cs @ 6142

Last change on this file since 6142 was 6142, checked in by gschwarz, 12 years ago

#1433 Updated Problem Control/View

File size: 2.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.Web.Security;
7using System.ServiceModel.Security;
8//using HLWebPluginHost.OKBService;
9using System.Diagnostics;
10using HLWebOKBAdminPlugin.OKBAdministrationService;
11using HLWebOKBAdminPlugin.Helpers;
12using HLWebOKBAdminPlugin.Models;
13
14namespace HLWebOKBAdminPlugin.Controllers
15{
16    public class AdminController : Controller
17    {
18        private AdministrationServiceClient CertificateValidator() {
19            AdministrationServiceClient asc = new AdministrationServiceClient();
20
21            asc.ClientCredentials.UserName.UserName = HttpContext.Session["Username"].ToString();
22            asc.ClientCredentials.UserName.Password = HttpContext.Session["Password"].ToString();
23            asc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
24
25            return asc;
26        }//CertificateValidator
27
28        public ActionResult Index() {
29            return View();
30        }// ActionResult Index
31
32        public ActionResult Menu() {
33            return View();
34        }//ActionResult Men
35
36        public ActionResult AlgorithmClass() {
37            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
38
39            AdminModel am = new AdminModel();
40            Session["SelectedSubMenu"] = "AlgorithmClass";
41            var algorithmClasses = am.AlgorithmClassGetAll();           
42
43            return View(algorithmClasses);
44        }//ActionResult AlgorithmClassC:\SYS\profiles\schwgh\Desktop\WebApplication\MVC2\HLWebOKBAdminPlugin\Views\Admin\Algorithm.aspx
45
46        public ActionResult Algorithm() {
47            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
48
49            AdminModel am = new AdminModel();
50            Session["SelectedSubMenu"] = "Algorithm";
51            var algorithm = am.AlgorithmsGetAll();
52
53            return View(algorithm);
54        }//Algorithm
55
56        public ActionResult ProblemClass() {
57            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
58
59            AdminModel am = new AdminModel();
60            Session["SelectedSubMenu"] = "ProblemClass";
61            var problemClasses = am.ProblemClassGetAll();
62
63            return View(problemClasses);
64        }//ProblemClass
65
66        public ActionResult Problem() {
67            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
68
69            AdminModel am = new AdminModel();
70            Session["SelectedSubMenu"] = "Problem";
71            var problem = am.ProblemsGetAll();
72
73            return View(problem);
74        }//Problem
75
76        public ActionResult OKBNamedItemList_Test() {
77            return View();
78        }//Problem
79
80    }
81}
Note: See TracBrowser for help on using the repository browser.