Esempio n. 1
0
        public ActionResult BatchTime()
        {
            try
            {
                int uID      = int.Parse(Request.Params.Get("UID"));
                var stations = Request.Params.Get("stationId");

                JavaScriptSerializer js          = new JavaScriptSerializer();
                List <string>        stationList = js.Deserialize <List <string> >(stations);

                var ret = JsonConvert.SerializeObject(BatchService.GetTruList(uID, stationList));
                return(Json(ret, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                QueryResult error = new QueryResult();
                var         ret   = JsonConvert.SerializeObject(error);
                return(Json(ret, JsonRequestBehavior.AllowGet));
            }
        }