//提交修改后的个人信息 public ActionResult SubmitUpdateTeacherInfo(string teacherID, string contact, string other) { Teacher teacher = roleInfoService.SelectTeacherByID(teacherID); string teacherName = teacher.teacher_name; string teacherSex = teacher.teachert_sex; string teacherIDCard = teacher.teacher_id_card; int teacherAge = Convert.ToInt32(teacher.teachert_age); string teacherDepartment = teacher.teacher_department; string teacherTitle = teacher.teacher_title; string teacherNative = teacher.teacher_native; string teacherBirthplace = teacher.teacher_birthplace; string teacherPoliticsstatus = teacher.teacher_politicsstatus; string teacherTeachingtime = teacher.teacher_teachingtime; string teacherContact = teacher.teacher_contact; string teacherOther = teacher.teacher_other; int teacherStatus = Convert.ToInt32(teacher.status); if (!contact.Equals(teacherContact)) { teacherContact = contact; } if (!other.Equals(teacherOther)) { teacherOther = other; } string result = roleInfoService.UpdateTeacherInfo(teacherID, teacherName, teacherSex, teacherIDCard, teacherAge, teacherDepartment, teacherTitle, teacherNative, teacherBirthplace, teacherPoliticsstatus, teacherTeachingtime, teacherContact, teacherOther, teacherStatus); return(View("ChangeSelfInfo")); }
public ActionResult SubmitAdminUpdateTeacherInfo() { string teacherID = Request["teacherID"]; string teacherName = Request["teacherName"]; string teacherSex = Request["teacherSex"]; string teacherIDCard = Request["teacherIDCard"]; string TeacherAge = Request["teacherAge"]; string teacherDepartment = Request["teacherDepartment"]; string teacherTitle = Request["teacherTitle"]; string teacherNative = Request["teacherNative"]; string teacherBirthplace = Request["teacherBirthplace"]; string teacherPoliticsstatus = Request["teacherPoliticsstatus"]; string teacherTeachingtime = Request["teacherTeachingtime"]; string teacherContact = Request["teacherContact"]; string teacherOther = Request["teacherOther"]; string TeacherStatus = Request["teacherStatus"]; // 转换数据类型 int teacherAge = Convert.ToInt32(TeacherAge); int teacherStatus = Convert.ToInt32(TeacherStatus); string result = roleInfoService.UpdateTeacherInfo(teacherID, teacherName, teacherSex, teacherIDCard, teacherAge, teacherDepartment, teacherTitle, teacherNative, teacherBirthplace, teacherPoliticsstatus, teacherTeachingtime, teacherContact, teacherOther, teacherStatus); return(View("AdminAlterTeacherInfo")); }