public JsonResult addStudent(JiaJiModels.student infor) { try { infor.Image = "/image/" + infor.Image; var i = new JiaJiBLL.stubll().addStu(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 editStudent(JiaJiModels.student model) { try { int id = model.StudentID; var i = new JiaJiBLL.stubll().UpdateStu(model); if (i > 0) { return(Json(new { Success = true, Message = "修改成功" })); } else { return(Json(new { Success = false, Message = "修改失败" })); } } catch { return(Json(new { Success = false, Message = "修改失败" })); } }