示例#1
0
        public ActionResult SubmitAdminUpdateStudentInfo()
        {
            string studentID             = Request["studentID"];
            string studentName           = Request["studentName"];
            string studentSex            = Request["studentSex"];
            string studentIDCard         = Request["studentIDCard"];
            string StudentAge            = Request["studentAge"];
            string studentDepartment     = Request["studentDepartment"];
            string studentMajor          = Request["studentMajor"];
            string studentGrade          = Request["studentGrade"];
            string studentType           = Request["studentType"];
            string studentAddress        = Request["studentAddress"];
            string studentNative         = Request["studentNative"];
            string studentBirthplace     = Request["studentBirthplace"];
            string studentPoliticsstatus = Request["studentPoliticsstatus"];
            string studentContact        = Request["studentContact"];
            string studentFamily         = Request["studentFamily"];
            string studentAward          = Request["studentAward"];
            string studentOther          = Request["studentOther"];
            string StudentStatus         = Request["studentStatus"];

            //数据类型转换
            int studentAge    = Convert.ToInt32(StudentAge);
            int studentStatus = Convert.ToInt32(StudentStatus);

            string result = roleInfoService.UpdateStudentInfo(studentID, studentName, studentSex, studentIDCard, studentAge, studentDepartment, studentMajor, studentGrade, studentType, studentAddress, studentNative, studentBirthplace, studentPoliticsstatus, studentContact, studentFamily, studentAward, studentOther, studentStatus);

            return(Json(new { status = 1, msg = "OK!" }));
        }
示例#2
0
        //提交修改后的个人信息
        public ActionResult SubmitUpdateStudentInfo(string studentID, string contact, string award, string other)
        {
            Student student               = roleInfoService.SelectStudent(studentID);
            string  studentName           = student.student_name;
            string  studentSex            = student.student_sex;
            string  studentIDCard         = student.student_id_card;
            int     studentAge            = Convert.ToInt32(student.student_age);
            string  studentDepartment     = student.student_department;
            string  studentMajor          = student.student_major;
            string  studentGrade          = student.student_grade;
            string  studentType           = student.student_type;
            string  studentAddress        = student.student_address;
            string  studentNative         = student.student_native;
            string  studentBirthplace     = student.student_birthplace;
            string  studentPoliticsstatus = student.student_politicsstatus;
            string  studentContact        = student.student_contact;
            string  studentFamily         = student.student_family;
            string  studentAward          = student.student_award;
            string  studentOther          = student.student_other;
            int     studentStatus         = Convert.ToInt32(student.status);

            if (contact != null)
            {
                studentContact = contact;
            }
            if (award != null)
            {
                studentAward = award;
            }
            if (other != null)
            {
                studentOther = other;
            }

            string result = roleInfoService.UpdateStudentInfo(studentID, studentName, studentSex, studentIDCard, studentAge, studentDepartment, studentMajor, studentGrade, studentType, studentAddress, studentNative, studentBirthplace, studentPoliticsstatus, studentContact, studentFamily, studentAward, studentOther, studentStatus);

            return(View("ChangeSelfInfo"));
        }