/// <summary> /// 修改信息 /// </summary> /// <param name="studentInformation"></param> /// <returns></returns> public JsonResult ChangeStudentInfomationByID(T.Models.Stu_StuInformation studentInformation) { Commen.ReturnValue returnValue = new Commen.ReturnValue(0, "修改成功!", ""); var IsTrueOrFalse = _stu.ChangeStudent(studentInformation); if (IsTrueOrFalse) { return(Json(returnValue)); } else { returnValue.Success = 1; returnValue.Message = "增加失败!"; return(Json(returnValue)); } }
/// <summary> /// 增加信息 /// </summary> /// <param name="stu"></param> /// <returns></returns> public bool ChangeStudent(T.Models.Stu_StuInformation stu) { //int keyID = stu.keyID; string studentID = stu.studentID; string studentName = stu.studentName; string stuGender = stu.stuGender; DateTime stuBirthdate = stu.stuBirthdate; string stuNation = stu.stuNation; string stuAdress = stu.stuAdress; string stuHealth = stu.stuHealth; string stuClass = stu.stuClass; string stuSchoolSystem = stu.stuSchoolSystem; string stuDorm = stu.stuDorm; string stuEmail = stu.stuEmail; string stuPhone = stu.stuPhone; int stuPostCode = (int)stu.stuPostCode; string stuIDNumber = stu.stuIDNumber; string stuRemark = stu.stuRemark; return(dal.ChangeStudent(studentID, studentName, stuGender, stuBirthdate, stuNation, stuAdress, stuHealth, stuClass, stuSchoolSystem, stuDorm, stuEmail, stuPhone, stuPostCode, stuIDNumber, stuRemark)); }