예제 #1
0
 public string AllRoutesInJson()
 {
     if (string.IsNullOrEmpty(HomeDirectory))
     {
         HomeDirectory = Server.MapPath("~/");
     }
     return(BusUtil.AllRoutesToJson());
 }
예제 #2
0
        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");
        }
예제 #3
0
        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));
        }
예제 #4
0
 public string CheckRouteInJson(string s, bool isToComp)
 {
     return(BusUtil.CheckRouteToJson(s, isToComp));
 }