/// <summary> /// 删除团队信息 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteInsertTeam(string ids) { bool isOK = new JiaJiBLL.teambll().DelTeamInfo(ids); if (isOK) { return(0); } else { return(1); } }
/// <summary> /// 删除团队标题信息 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteTitle(string ids) { bool isOK = new JiaJiBLL.teambll().DelTeamTitle(ids); if (isOK) { return(0); } else { return(1); } }
public JsonResult addTitle(JiaJiModels.Team infor) { try { var i = new JiaJiBLL.teambll().InsertTitle(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 getTitle(int page, int rows, string TitleName = "", int?TeamID = null) { var list = new JiaJiBLL.teambll().Titleshow(); var result = new { total = list. Where(e => e.TitleName.Contains(TitleName) && (TeamID == null ? true : e.TeamID == TeamID) ).Count(), rows = list. Where(e => e.TitleName.Contains(TitleName) && (TeamID == null ? true : e.TeamID == TeamID) ).Skip((page - 1) * rows).Take(rows) }; //var result = new { total = list.Count, rows = list.Where(e=>e.TitleName.Contains(TitleName)) .Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult getInsertTeam(int page, int rows, int?AreaID = null) { var list = new JiaJiBLL.teambll().GetTeam(); var result = new { total = list. Where(e => (AreaID == null ? true : e.AreaID == AreaID) ).Count(), rows = list. Where(e => (AreaID == null ? true : e.AreaID == AreaID) ).Skip((page - 1) * rows).Take(rows) }; //var result = new { total = list.Count, rows = list.Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult addInsertTeam(JiaJiModels.Team infor) { try { infor.Image1 = "/image/" + infor.Image1; infor.Image2 = "/image/" + infor.Image2; var i = new JiaJiBLL.teambll().addTeam(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 editTitle(JiaJiModels.Team model) { try { int id = model.TermRealID; var i = new JiaJiBLL.teambll().UpdateTitle(model); if (i > 0) { return(Json(new { Success = true, Message = "修改成功" })); } else { return(Json(new { Success = false, Message = "修改失败" })); } } catch { return(Json(new { Success = false, Message = "修改失败" })); } }