[4784] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using System.Web.Mvc;
|
---|
| 6 | using System.Diagnostics;
|
---|
| 7 | using System.ServiceModel.Security;
|
---|
| 8 | using System.Web.Security;
|
---|
| 9 |
|
---|
| 10 | namespace HLWebPluginHost.Controllers
|
---|
| 11 | {
|
---|
| 12 | public class ServicePrototypeController : Controller
|
---|
| 13 | {
|
---|
| 14 | //
|
---|
| 15 | // GET: /ServicePrototype/
|
---|
| 16 |
|
---|
| 17 | public ActionResult Index()
|
---|
| 18 | {
|
---|
| 19 |
|
---|
| 20 | OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient();
|
---|
| 21 | sc.ClientCredentials.UserName.UserName = Membership.GetUser().UserName;
|
---|
| 22 | sc.ClientCredentials.UserName.Password = Membership.GetUser().GetPassword();
|
---|
| 23 | sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
|
---|
| 24 | OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses();
|
---|
| 25 | foreach (OKBService.AlgorithmClass i in ac) {
|
---|
| 26 | Debug.WriteLine(i.Name);
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | sc.Close();
|
---|
| 30 | return View();
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | //
|
---|
| 34 | // GET: /ServicePrototype/Details/5
|
---|
| 35 |
|
---|
| 36 | public ActionResult Details(int id)
|
---|
| 37 | {
|
---|
| 38 | return View();
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | //
|
---|
| 42 | // GET: /ServicePrototype/Create
|
---|
| 43 |
|
---|
| 44 | public ActionResult Create()
|
---|
| 45 | {
|
---|
| 46 | return View();
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | //
|
---|
| 50 | // POST: /ServicePrototype/Create
|
---|
| 51 |
|
---|
| 52 | [HttpPost]
|
---|
| 53 | public ActionResult Create(FormCollection collection)
|
---|
| 54 | {
|
---|
| 55 | try
|
---|
| 56 | {
|
---|
| 57 | // TODO: Add insert logic here
|
---|
| 58 |
|
---|
| 59 | return RedirectToAction("Index");
|
---|
| 60 | }
|
---|
| 61 | catch
|
---|
| 62 | {
|
---|
| 63 | return View();
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | //
|
---|
| 68 | // GET: /ServicePrototype/Edit/5
|
---|
| 69 |
|
---|
| 70 | public ActionResult Edit(int id)
|
---|
| 71 | {
|
---|
| 72 | return View();
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | //
|
---|
| 76 | // POST: /ServicePrototype/Edit/5
|
---|
| 77 |
|
---|
| 78 | [HttpPost]
|
---|
| 79 | public ActionResult Edit(int id, FormCollection collection)
|
---|
| 80 | {
|
---|
| 81 | try
|
---|
| 82 | {
|
---|
| 83 | // TODO: Add update logic here
|
---|
| 84 |
|
---|
| 85 | return RedirectToAction("Index");
|
---|
| 86 | }
|
---|
| 87 | catch
|
---|
| 88 | {
|
---|
| 89 | return View();
|
---|
| 90 | }
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | //
|
---|
| 94 | // GET: /ServicePrototype/Delete/5
|
---|
| 95 |
|
---|
| 96 | public ActionResult Delete(int id)
|
---|
| 97 | {
|
---|
| 98 | return View();
|
---|
| 99 | }
|
---|
| 100 |
|
---|
| 101 | //
|
---|
| 102 | // POST: /ServicePrototype/Delete/5
|
---|
| 103 |
|
---|
| 104 | [HttpPost]
|
---|
| 105 | public ActionResult Delete(int id, FormCollection collection)
|
---|
| 106 | {
|
---|
| 107 | try
|
---|
| 108 | {
|
---|
| 109 | // TODO: Add delete logic here
|
---|
| 110 |
|
---|
| 111 | return RedirectToAction("Index");
|
---|
| 112 | }
|
---|
| 113 | catch
|
---|
| 114 | {
|
---|
| 115 | return View();
|
---|
| 116 | }
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 | }
|
---|