| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新发布数据的坐标 |
| | | /// 更新发布数据 |
| | | /// </summary> |
| | | public static int UpdatePublishGeom(int pid, string geom) |
| | | public static int UpdatePublish(int pubid, string name, int userId, string geom) |
| | | { |
| | | string sql = string.Format("update lf.sys_publish set geom = {0} where id = {1}", string.IsNullOrEmpty(geom) ? "null" : geom, pid); |
| | | //DbParameter dp = new NpgsqlParameter("@geom", geom); |
| | | string str = null == geom ? "" : string.Format(", geom={0}", geom); |
| | | string sql = string.Format("update lf.sys_publish set name=@name, update_user=@userId, create_time=now(), update_time=now(){0} where id=@id", str); |
| | | |
| | | return Tools.DBHelper.ExecuteNonQuery(sql); |
| | | DbParameter dp1 = new NpgsqlParameter("@name", name); |
| | | DbParameter dp2 = new NpgsqlParameter("@userId", userId); |
| | | DbParameter dp3 = new NpgsqlParameter("@id", pubid); |
| | | |
| | | return Tools.DBHelper.ExecuteNonQuery(sql, dp1, dp2, dp3); |
| | | } |
| | | |
| | | /// <summary> |