public IHttpActionResult JtydList(sys_page parm) { try { int resultcount = 0; JTYDService jtyds = new JTYDService(); var list = jtyds.Search(parm, out resultcount); return(Json(new { code = 1, msg = "ok", list = list, resultcount = resultcount })); } catch (Exception) { throw; } }
public IHttpActionResult JtydAdd(List <zxjc_t_ydjl> entitys) { try { JTYDService jtyds = new JTYDService(); int ret = jtyds.Add(entitys); if (ret > 0) { return(Json(new { code = 1, msg = "数据保存成功" })); } else { return(Json(new { code = 0, msg = "数据保存失败" })); } } catch (Exception) { throw; } }