public JsonResult getFiliale(int page, int rows) { var list = new JiaJiBLL.FilialeBll().FilialeShow(); var result = new { total = list.Count, rows = list.OrderBy(e => e.FilialeId).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
/// <summary> /// 删除资讯 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteFilialeadd(string ids) { bool isOK = new JiaJiBLL.FilialeBll().DelFilialeText(ids); if (isOK) { return(0); } else { return(1); } }
public JsonResult getFilialeadd(int page, int rows, int?FilialeId = null) { var list = new JiaJiBLL.FilialeBll().ShowFenGongsi(); var result = new { total = list. Where(e => (FilialeId == null ? true : e.FilialeId == FilialeId) ).Count(), rows = list. Where(e => (FilialeId == null ? true : e.FilialeId == FilialeId) ).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult addFiliale(JiaJiModels.filialetext infor) { try { var i = new JiaJiBLL.FilialeBll().addFiliale(infor); 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 editFilialeadd(JiaJiModels.filialetext model) { try { int id = model.FilialeTextId; var i = new JiaJiBLL.FilialeBll().UpdateFilialeText(model); if (i > 0) { return(Json(new { Success = true, Message = "修改成功" })); } else { return(Json(new { Success = false, Message = "修改失败" })); } } catch { return(Json(new { Success = false, Message = "修改失败" })); } }