Last change
on this file since 4939 was
4939,
checked in by wtollsch, 14 years ago
|
#1198 Added AlgorithmClassController, AlgorithmClassModel, AlgorithmClass/Index.aspx with ListBox
|
File size:
1.7 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Web;
|
---|
5 | using System.Web.Mvc;
|
---|
6 | using System.ServiceModel.Security;
|
---|
7 | using HLWebPluginHost.Models;
|
---|
8 |
|
---|
9 | namespace HLWebPluginHost.Controllers
|
---|
10 | {
|
---|
11 | public class AlgorithmClassController : Controller
|
---|
12 | {
|
---|
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 | return View(viewModel);
|
---|
35 | }//index
|
---|
36 |
|
---|
37 | //
|
---|
38 | // GET: /AlgorithmClass/Browse
|
---|
39 |
|
---|
40 | public string Browse() {
|
---|
41 | string message = "AlgorithmClass.Browse, id = " + Server.HtmlEncode(Request.QueryString["id"]);
|
---|
42 | return Server.HtmlEncode(message);
|
---|
43 | }//index
|
---|
44 |
|
---|
45 | //
|
---|
46 | // GET: /AlgorithmClass/Details/2
|
---|
47 |
|
---|
48 | public string Details(int id) {
|
---|
49 | string message = "AlgorithmClass.Details, id = " + id;
|
---|
50 | return Server.HtmlEncode(message);
|
---|
51 | }//index
|
---|
52 |
|
---|
53 | }
|
---|
54 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.