public string DeleteFromInfo(Guid id) { DboUtils db = new DboUtils(); List <Entity.Info> list = new List <Entity.Info>(); list = getInfoListById(id); Guid up_item = list[0].up_item; String sql = "delete from top_info where id='" + id + "'"; int x = db.delete(sql); string message = "操作失败"; if (x > 0) { message = "操作成功"; string json = JsonConvert.SerializeObject(new { message = message, statusCode = 200, navTabId = up_item, callbackType = "", forwardUrl = "" }); return(json); } else { string json = JsonConvert.SerializeObject(new { message = message, statusCode = 300, navTabId = up_item, callbackType = "", forwardUrl = "" }); return(json); } }
public String deleteGood(Guid id) { DboUtils db = new DboUtils(); String sql = "delete from good where id='" + id + "'"; int x = db.delete(sql); string message = "操作失败"; if (x > 0) { message = "操作成功"; return(message); } else { return(message); } }
public String DeleteFromAdmin(String username) { String nav = "GoodsClassTree"; DboUtils db = new DboUtils(); String sql = "delete from admin where username='******'"; int x = db.delete(sql); string message = "操作失败"; if (x > 0) { message = "操作成功"; string json = JsonConvert.SerializeObject(new { message = message, statusCode = 200, navTabId = nav, callbackType = "", forwardUrl = "" }); return(json); } else { string json = JsonConvert.SerializeObject(new { message = message, statusCode = 300, navTabId = username, callbackType = "", forwardUrl = "" }); return(json); } }
public String InsertIntoInfo(String title, String position, String info, String img_s, String img_b, String video) { DboUtils db = new DboUtils(); String s = Request.Form["orgLookup.id"]; Guid up_item = Guid.Parse(s); String sql = "INSERT INTO top_info(title, up_item, position, info, img_s, img_b, video)" + " VALUES('" + title + "','" + up_item + "','" + position + "','" + info + "','" + img_s + "','" + img_b + "','" + video + "')"; int x = db.delete(sql); string message = "操作失败"; if (x > 0) { message = "操作成功"; string json = JsonConvert.SerializeObject(new { message = message, statusCode = 200, navTabId = up_item, callbackType = "c", forwardUrl = "" }); return(json); } else { string json = JsonConvert.SerializeObject(new { message = message, statusCode = 300, navTabId = up_item, callbackType = "", forwardUrl = "" }); return(json); } }