/// <summary> /// 显示 /// </summary> /// <param name="page"></param> /// <param name="rows"></param> /// <returns></returns> public JsonResult getLanBgYi(int page, int rows) { var list = new JiaJiBLL.SprelationBll().LBYshow(); var result = new { total = list.Count, rows = list.OrderBy(e => e.CountryID).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }
public JsonResult addCountryInfo(JiaJiModels.country model) { try { model.CountryImg = "/image/" + model.CountryImg; model.CountryImg2 = "/image/" + model.CountryImg2; model.CountryActiveImg1 = "/image/" + model.CountryActiveImg1; model.CountryActiveImg2 = "/image/" + model.CountryActiveImg2; var i = new JiaJiBLL.SprelationBll().AddCountry(model); if (i > 0) { return(Json(new { Success = true, Message = "添加成功" })); } else { return(Json(new { Success = false, Message = "添加失败" })); } } catch { return(Json(new { Success = false, Message = "添加失败" })); } }
/// <summary> /// 删除 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteLanBgYi(string ids) { bool isOK = new JiaJiBLL.SprelationBll().DelCountry(ids); if (isOK) { return(0); } else { return(1); } }
/// <summary> /// 删除留学规划 /// </summary> /// <param name="ids"></param> /// <returns></returns> public int deleteSprelation(string ids) { bool isOK = new JiaJiBLL.SprelationBll().DelLiuXueGuiHua(ids); if (isOK) { return(0); } else { return(1); } }
public JsonResult addSprelation(JiaJiModels.StudentProgram model) { try { model.ImageUrl = "/image/" + model.ImageUrl; var i = new JiaJiBLL.SprelationBll().StudentprogramAdd(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 editLanBgYi(JiaJiModels.country model) { try { int id = model.CountryID; var i = new JiaJiBLL.SprelationBll().UpdCountry(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 editSprelation(JiaJiModels.StudentProgram model) { try { int id = model.StudentProgramID; var i = new JiaJiBLL.SprelationBll().UpdStudentprogram(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 getSprelation(int page, int rows, string StudentProgramTitle = "", int?CountryID = null, int?EducationID = null, int?TypeID = null) { var list = new JiaJiBLL.SprelationBll().ShowLiuXueGuiHua(); var result = new { total = list. Where(e => e.StudentProgramTitle.Contains(StudentProgramTitle) && (CountryID == null ? true : e.CountryID == CountryID) && (EducationID == null ? true : e.EducationID == EducationID) && (TypeID == null ? true : e.TypeID == TypeID) ).Count(), rows = list. Where(e => e.StudentProgramTitle.Contains(StudentProgramTitle) && (CountryID == null ? true : e.CountryID == CountryID) && (EducationID == null ? true : e.EducationID == EducationID) && (TypeID == null ? true : e.TypeID == TypeID) ).Skip((page - 1) * rows).Take(rows) }; return(Json(result)); }