Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AlgorithmClassController.cs @ 4985

Last change on this file since 4985 was 4985, checked in by wtollsch, 13 years ago

#1198 HLWebOkbAdminPlugin

File size: 2.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.ServiceModel.Security;
7using HLWebPluginHost.Models;
8
9namespace HLWebPluginHost.Controllers {
10    public class AlgorithmClassController : Controller {
11        //
12        // GET: /AlgorithmClass/
13
14        public ActionResult Index() {
15            //create list of algorithms
16            //OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient();
17            //sc.ClientCredentials.UserName.UserName = "Gerhard";
18            //sc.ClientCredentials.UserName.Password = "Gerhard";
19            //sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
20
21            //var agcList = new List<OKBService.AlgorithmClass>();
22            //OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses();
23            //foreach (OKBService.AlgorithmClass a in ac) {
24            //    agcList.Add(a);
25            //}//foreach
26
27            //var viewModel = new AlgorithmClassModel {
28            //    NumOfClasses = agcList.Count(),
29            //    AlgorithmClassList = agcList
30            //};
31
32            var viewModel = new AlgorithmClassModel {
33                NumOfClasses = 0,
34                AlgorithmClassList = null
35            };
36
37            viewModel.AddAlgorithmClass("aaa", "na");
38
39            return View(viewModel);
40        }//index
41
42        //
43        // GET: /AlgorithmClass/Browse
44
45        public string Browse() {
46            string message = "AlgorithmClass.Browse, id = " + Server.HtmlEncode(Request.QueryString["id"]);
47            return Server.HtmlEncode(message);
48        }//index
49
50        //
51        // GET: /AlgorithmClass/Details/2
52
53        public string Details(int id) {
54            string message = "AlgorithmClass.Details, id = " + id;
55            return Server.HtmlEncode(message);
56        }//index
57
58        //
59        // GET: /AlgotithmClass/5
60        public string DelAlgorithmClass(int id) {
61            string message = "DeleteAlgorithmClass, id = " + Server.HtmlEncode(Request.QueryString["id"]);
62            return Server.HtmlEncode(message);
63        }
64
65        public bool AddAlgorithmClass_Click(string name, String description) {
66            var viewModel = new AlgorithmClassModel {
67                NumOfClasses = 0,
68                AlgorithmClassList = null
69            };
70
71            viewModel.AddAlgorithmClass("aaa", "na");
72
73            return true;
74
75        }//AddAlgorithmClass
76
77    }
78}
Note: See TracBrowser for help on using the repository browser.