Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 11194 was 6317, checked in by jwolfing, 14 years ago

#1433 code formatted

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