public JsonResult getsolution(int page, int rows, string SolutionTitle = "") { var list = new JiaJiBLL.Solutionbll().ShowSolution(); var result = new { total = list.Count, rows = list.Where(e => e.SolutionTitle.Contains(SolutionTitle)).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
/// <summary> /// 删除解决方案 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deletesolution(string ids) { bool isOK = new JiaJiBLL.Solutionbll().DelSolution(ids); if (isOK) { return(0); } else { return(1); } }
public ActionResult addsolution(JiaJiModels.solution model) { try { var i = new JiaJiBLL.Solutionbll().soladd(model); if (i > 0) { return(Json(new { Success = true, Message = "添加成功" })); } else { return(Json(new { Success = false, Message = "添加失败" })); } } catch { return(Json(new { Success = false, Message = "添加失败" })); } }
public JsonResult editsolution(JiaJiModels.solution model) { try { int id = model.SolutionID; var i = new JiaJiBLL.Solutionbll().UpdSolu(model); if (i > 0) { return(Json(new { Success = true, Message = "修改成功" })); } else { return(Json(new { Success = false, Message = "修改失败" })); } } catch { return(Json(new { Success = false, Message = "修改失败" })); } }