Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 11589 was 6317, checked in by jwolfing, 13 years ago

#1433 code formatted

File size: 2.5 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;
8using System.Diagnostics;
9using HLWebOKBAdminPlugin.OKBAdministrationService;
10using HLWebOKBAdminPlugin.Helpers;
11using HLWebOKBAdminPlugin.Models;
12using System.Reflection;
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
32      return View();
33    }//ActionResult Men
34
35    public ActionResult AlgorithmClass() {
36      AdministrationServiceClient adminCLient = Admin.GetClientFactory();
37
38      AdminModel am = new AdminModel();
39      Session["SelectedSubMenu"] = "AlgorithmClass";
40      var algorithmClasses = am.AlgorithmClassProp;
41
42      return View(algorithmClasses);
43    }//ActionResult AlgorithmClassC:\SYS\profiles\schwgh\Desktop\WebApplication\MVC2\HLWebOKBAdminPlugin\Views\Admin\Algorithm.aspx
44
45    public ActionResult Algorithm() {
46      AdministrationServiceClient adminCLient = Admin.GetClientFactory();
47
48      AdminModel am = new AdminModel();
49      Session["SelectedSubMenu"] = "Algorithm";
50      var algorithm = am.AlgorithmsGetAll();
51
52      return View(algorithm);
53    }//Algorithm
54
55    public ActionResult ProblemClass() {
56      AdministrationServiceClient adminCLient = Admin.GetClientFactory();
57
58      AdminModel am = new AdminModel();
59      Session["SelectedSubMenu"] = "ProblemClass";
60      var problemClasses = am.ProblemClassGetAll();
61
62      return View(problemClasses);
63    }//ProblemClass
64
65    public ActionResult Problem() {
66      AdministrationServiceClient adminCLient = Admin.GetClientFactory();
67
68      AdminModel am = new AdminModel();
69      Session["SelectedSubMenu"] = "Problem";
70      var problem = am.ProblemsGetAll();
71
72      return View(problem);
73    }//Problem
74
75    public ActionResult OKBNamedItemList_Test() {
76      return View();
77    }//Problem
78
79  }
80}
Note: See TracBrowser for help on using the repository browser.