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 HLWebPluginHost.OKBService;
|
---|
9 | using System.Diagnostics;
|
---|
10 | using HLWebOKBAdminPlugin.OKBAdministrationService;
|
---|
11 | using HLWebOKBAdminPlugin.Helpers;
|
---|
12 | using HLWebOKBAdminPlugin.Models;
|
---|
13 |
|
---|
14 | namespace 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 | }
|
---|