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() })); } }
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() })); } }
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() })); } }