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 | 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 | }
|
---|