/// <summary> /// 修改留学申请条件 /// </summary> /// <returns></returns> public int UpdApplyCondition(JiaJiModels.ApplyModel.ApplyCondition model) { try { return(new JiaJiDAL.ApplyDAL().UpdApplyCondition(model)); } catch (Exception ex) { return(0); } }
/// <summary> /// 留学材料 /// </summary> /// <param name="Con"></param> /// <returns></returns> public int ArrangeCondition(JiaJiModels.ApplyModel.ApplyCondition Con) { string sql = "insert into applycondition(ApplyTitle,ApplyContent)values(@Title,@Content)"; MySqlParameter[] para = { new MySqlParameter("@Title", Con.ApplyTitle), new MySqlParameter("@Content", Con.ApplyContent) }; return(MySqlDB.nonquery(sql, System.Data.CommandType.Text, para)); }
/// <summary> /// 修改留学申请条件 /// </summary> /// <returns></returns> public int UpdApplyCondition(JiaJiModels.ApplyModel.ApplyCondition model) { try { string sql = "update applycondition set ApplyTitle = '" + model.ApplyTitle + "' where ApplyID=" + model.ApplyID + " "; int h = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null); return(h); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加留学申请条件 /// </summary> /// <param name="model"></param> /// <returns></returns> public int addApplyCondition(JiaJiModels.ApplyModel.ApplyCondition model) { try { string sql = "insert into applycondition(ApplyTitle) Values('" + model.ApplyTitle + "')"; int h = MySqlDB.nonquery(sql, System.Data.CommandType.Text, null); return(h); } catch (Exception ex) { return(0); } }
public ActionResult addapplycondition(JiaJiModels.ApplyModel.ApplyCondition model) { try { var i = new JiaJiBLL.ApplyBLL().addApplyCondition(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 = "修改失败" })); } }
/// <summary> /// 留学材料 /// </summary> /// <param name="Con"></param> /// <returns></returns> public int ArrangeCondition(JiaJiModels.ApplyModel.ApplyCondition Con) { return(new JiaJiDAL.ApplyDAL().ArrangeCondition(Con)); }