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