Ejemplo n.º 1
0
        public JsonResult GetSigleByID(string lineguid)
        {
            t_linepoint temp = null;

            try
            {
                temp = myPostRepo.GetSingle_T_LinePoint(lineguid);
                return(Json(new { success = "200", data = temp }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = "404", error = ex.ToString() }));
            }
        }
Ejemplo n.º 2
0
        public JsonResult UpdateLinePoint()//int gid ,[FromBody] Area area)
        {
            bool updatestatus = false;

            try
            {
                t_linepoint linepoint = new t_linepoint();
                //area.gid = 1000;
                //area.objectid = 2000;
                //area.sqkm = 0.88m;
                //area.sqmi = 0.44m;
                //area.continent = "myxiugai";
                //area.geom = null;
                updatestatus = myPostRepo.Update_T_LinePoint(linepoint);
                return(Json(new { success = "200", data = updatestatus }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = "404", error = ex.ToString() }));
            }
        }
Ejemplo n.º 3
0
        public JsonResult AddLinePoint()//[FromBody] Area area)
        {
            bool addstatus = false;

            try
            {
                t_linepoint linepoint = new t_linepoint();
                //area.gid = 1000;
                //area.objectid = 1000;
                //area.sqkm = 0.23m;
                //area.sqmi = 0.24m;
                //area.continent = "ceshi";

                // linepoint.geom = null;
                addstatus = myPostRepo.AddSingle_T_LinePoint(linepoint);
                return(Json(new { success = "200", data = addstatus }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = "404", error = ex.ToString() }));
            }
        }