using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Diagnostics; using System.ServiceModel.Security; using System.Web.Security; namespace HLWebPluginHost.Controllers { public class ServicePrototypeController : Controller { // // GET: /ServicePrototype/ public ActionResult Index() { OKBService.OKBServiceClient sc = new OKBService.OKBServiceClient(); sc.ClientCredentials.UserName.UserName = Membership.GetUser().UserName; sc.ClientCredentials.UserName.Password = Membership.GetUser().GetPassword(); sc.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None; //read algorithm class entries Debug.WriteLine("algorithm class entries"); OKBService.AlgorithmClass[] ac = sc.GetAlgorithmClasses(); foreach (OKBService.AlgorithmClass i in ac) { Debug.WriteLine(i.Name); } //read problem class entries Debug.WriteLine("problem class entries"); OKBService.ProblemClass[] pc = sc.GetProblemClasses(); foreach (OKBService.ProblemClass i in pc) { Debug.WriteLine(i.Name); } sc.Close(); return View(); } // // GET: /ServicePrototype/Details/5 public ActionResult Details(int id) { return View(); } // // GET: /ServicePrototype/Create public ActionResult Create() { return View(); } // // POST: /ServicePrototype/Create [HttpPost] public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here return RedirectToAction("Index"); } catch { return View(); } } // // GET: /ServicePrototype/Edit/5 public ActionResult Edit(int id) { return View(); } // // POST: /ServicePrototype/Edit/5 [HttpPost] public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here return RedirectToAction("Index"); } catch { return View(); } } // // GET: /ServicePrototype/Delete/5 public ActionResult Delete(int id) { return View(); } // // POST: /ServicePrototype/Delete/5 [HttpPost] public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here return RedirectToAction("Index"); } catch { return View(); } } } }