1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Web;
|
---|
5 | using System.Web.Mvc;
|
---|
6 | using System.Web.Security;
|
---|
7 | using System.ServiceModel.Security;
|
---|
8 | using System.Diagnostics;
|
---|
9 | using HLWebOKBAdminPlugin.OKBAdministrationService;
|
---|
10 | using HLWebOKBAdminPlugin.Helpers;
|
---|
11 | using HLWebOKBAdminPlugin.Models;
|
---|
12 | using System.Reflection;
|
---|
13 |
|
---|
14 | namespace 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 | }
|
---|