Example #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");
 }
Example #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");
 }
Example #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));
        }