Exemplo n.º 1
0
 public ActionResult DeleteLocation(int Id)
 {
     var user = Session["userId"] ?? "";
     if (user.ToString() == "")
         return Redirect("~/Login/Index");
     IChooseServers chooseServers = new ChooseServers();
     chooseServers.DeleteLocation(Id);
     return RedirectToAction("Choose");
 }
Exemplo n.º 2
0
 public ActionResult AddALocation(string AddressName)
 {
     var user = Session["userId"] ?? "";
     if (user.ToString() == "")
         return Redirect("~/Login/Index");
     IChooseServers chooseServers = new ChooseServers();
     chooseServers.AddALocation((int) user, AddressName);
     return RedirectToAction("Choose");
 }
Exemplo n.º 3
0
        public ActionResult Choose()
        {
            var user = Session["userId"] ?? "";
            if (user.ToString() == "")
                return Redirect("~/Login/Index");
            IChooseServers chooseServers=new ChooseServers();
            IList<LocationData> locationList=chooseServers.GetLocations((int)user);

            return View("ChoosePage",GetLocationList(locationList));
        }