Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 5155 was 5081, checked in by wtollsch, 14 years ago

#1198 prototype call methods from okb service

File size: 2.6 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        //container for data
12        AlgorithmClassModel viewModel;
13        //
14        // GET: /AlgorithmClass/
15
16        public ActionResult Index() {
17            //create list of algorithms
18            //OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient();
19            //sc.ClientCredentials.UserName.UserName = "Gerhard";
20            //sc.ClientCredentials.UserName.Password = "Gerhard";
21            //sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
22
23            //var agcList = new List<OKBService.AlgorithmClass>();
24            //OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses();
25            //foreach (OKBService.AlgorithmClass a in ac) {
26            //    agcList.Add(a);
27            //}//foreach
28
29            //var viewModel = new AlgorithmClassModel {
30            //    NumOfClasses = agcList.Count(),
31            //    AlgorithmClassList = agcList
32            //};
33
34            viewModel = new AlgorithmClassModel {
35                NumOfClasses = 0,
36                AlgorithmClassList = null
37            };           
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(string name, String description) {
66            //var viewModel = new AlgorithmClassModel {
67            //    NumOfClasses = 0,
68            //    AlgorithmClassList = null
69            //};
70
71            viewModel.AddAlgorithmClass("ccc", "na");
72
73            return true;
74
75        }//AddAlgorithmClass
76
77    }
78}
Note: See TracBrowser for help on using the repository browser.