Free cookie consent management tool by TermsFeed Policy Generator

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

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

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

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    public class AdminController : Controller {
16        private AdministrationServiceClient CertificateValidator() {
17            AdministrationServiceClient asc = new AdministrationServiceClient();
18
19            asc.ClientCredentials.UserName.UserName = HttpContext.Session["Username"].ToString();
20            asc.ClientCredentials.UserName.Password = HttpContext.Session["Password"].ToString();
21            asc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
22
23            return asc;
24        }//CertificateValidator
25
26        public ActionResult Index() {
27            return View();
28        }// ActionResult Index
29
30        public ActionResult Menu() {
31            return View();
32        }//ActionResult Men
33
34        public ActionResult AlgorithmClass() {
35            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
36
37            AdminModel am = new AdminModel();
38            Session["SelectedSubMenu"] = "AlgorithmClass";
39            var algorithmClasses = am.AlgorithmClassProp;
40
41            return View(algorithmClasses);
42        }//ActionResult AlgorithmClassC:\SYS\profiles\schwgh\Desktop\WebApplication\MVC2\HLWebOKBAdminPlugin\Views\Admin\Algorithm.aspx
43
44        public ActionResult Algorithm() {
45            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
46
47            AdminModel am = new AdminModel();
48            Session["SelectedSubMenu"] = "Algorithm";
49            var algorithm = am.AlgorithmsGetAll();
50
51            return View(algorithm);
52        }//Algorithm
53
54        public ActionResult ProblemClass() {
55            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
56
57            AdminModel am = new AdminModel();
58            Session["SelectedSubMenu"] = "ProblemClass";
59            var problemClasses = am.ProblemClassGetAll();
60
61            return View(problemClasses);
62        }//ProblemClass
63
64        public ActionResult Problem() {
65            AdministrationServiceClient adminCLient = Admin.GetClientFactory();
66
67            AdminModel am = new AdminModel();
68            Session["SelectedSubMenu"] = "Problem";
69            var problem = am.ProblemsGetAll();
70
71            return View(problem);
72        }//Problem
73
74        public ActionResult OKBNamedItemList_Test() {
75            return View();
76        }//Problem
77
78    }
79}
Note: See TracBrowser for help on using the repository browser.