Esempio n. 1
0
        public ActionResult Search(GetZjCheckGPSByArea model)
        {
            DhtmlxGrid grid = new DhtmlxGrid();

            if (model.Area.IsNullOrEmpty())
            {
                model.Area = "南宁市";
            }
            var client   = new JsonServiceClient(GetSceneDataUrl);
            var response = client.Get(model);
            int index    = 1;

            if (response.IsSucc)
            {
                foreach (var item in response.gpsPileInfo)
                {
                    DhtmlxGridRow row = new DhtmlxGridRow(index + "," + item.GpsLongitude + "," + item.GpsLatitude);
                    row.AddCell(index);
                    row.AddCell(item.projectname);
                    row.AddCell(item.SerialNo);
                    row.AddCell(item.PileNo);
                    row.AddCell(item.areaname);
                    grid.AddGridRow(row);
                    index++;
                }
            }
            string str = grid.BuildRowXml().ToString(System.Xml.Linq.SaveOptions.DisableFormatting);

            return(Content(str, "text/xml"));
        }
Esempio n. 2
0
        // GET: ZJLocaleTestGPS
        public ActionResult Index()
        {
            var client = new JsonServiceClient(GetSceneDataUrl);
            GetZjCheckGPSByArea model = new GetZjCheckGPSByArea();

            var response = client.Get(model);

            return(View(response.gpsPileInfo));
        }