public string AllRoutesInJson() { if (string.IsNullOrEmpty(HomeDirectory)) { HomeDirectory = Server.MapPath("~/"); } return(BusUtil.AllRoutesToJson()); }
public String EditStation(FormCollection collection) { string name = collection["name"]; string route = collection["route"]; double x = Convert.ToDouble(collection["lng"]); double y = Convert.ToDouble(collection["lat"]); string r = string.Join("", route.Split()); BusUtil.AdminEditStation(name, r, x, y); return("success"); }
public String BestStationsInJson(FormCollection collection) { if (string.IsNullOrEmpty(HomeDirectory)) { HomeDirectory = Server.MapPath("~/"); } double x = Convert.ToDouble(collection["lng"]); double y = Convert.ToDouble(collection["lat"]); //double x = 0; //double y = 0; Point l = new Point(x, y); var allStations = DataAccess.ReadAllStations(); Station MicroSoft = allStations[4]; return(BusUtil.BestStationsToJson(l, MicroSoft)); }
public string CheckRouteInJson(string s, bool isToComp) { return(BusUtil.CheckRouteToJson(s, isToComp)); }