/// <summary> /// 显示提交信息列表 /// </summary> /// <param name="page"></param> /// <param name="rows"></param> /// <returns></returns> public JsonResult getApply(int page, int rows) { var list = new JiaJiBLL.ApplyBLL().StuApplyList(); var result = new { total = list.Count, rows = list.Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult getapplycondition(int page, int rows) { var list = new JiaJiBLL.ApplyBLL().ShowApplyCondition(); var result = new { total = list.Count, rows = list.OrderBy(e => e.ApplyID).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
/// <summary> /// 删除提交信息列表 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteApply(string ids) { bool isOK = new JiaJiBLL.ApplyBLL().DelApply(ids); if (isOK) { return(0); } else { return(1); } }
/// <summary> /// 删除国家申请条件 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteapplycondition(string ids) { bool isOK = new JiaJiBLL.ApplyBLL().DelApplyCondition(ids); if (isOK) { return(0); } else { return(1); } }
public JsonResult addApply(JiaJiModels.ApplyModel.ArrangeTime infor) { try { var i = new JiaJiBLL.ApplyBLL().addArrangeTime(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 ActionResult addApplyContent(JiaJiModels.ApplyModel.ApplyContentInfo model) { try { var i = new JiaJiBLL.ApplyBLL().addApplyContent(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 editApply(JiaJiModels.ApplyModel.ArrangeTime model) { try { int id = model.ArrangeID; var i = new JiaJiBLL.ApplyBLL().UpdArrangeTime(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 editapplycondition(JiaJiModels.ApplyModel.ApplyCondition model) { try { int id = model.ApplyID; var i = new JiaJiBLL.ApplyBLL().UpdApplyCondition(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 getApply(int page, int rows, int?CountryID = null, int?EducationID = null) { var list = new JiaJiBLL.ApplyBLL().ShowArrangTime(); var result = new { total = list. Where(e => (CountryID == null ? true : e.CountryID == CountryID) && (EducationID == null ? true : e.EducationID == EducationID) ).Count(), rows = list. Where(e => (CountryID == null ? true : e.CountryID == CountryID) && (EducationID == null ? true : e.EducationID == EducationID) ).Skip((page - 1) * rows).Take(rows) }; //var result = new { total = list.Count, rows = list.OrderBy(e => e.ArrangeID).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }