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