Example #1
0
        /// <summary>
        /// 保存学生的报名信息
        /// </summary>
        /// <param name="ssi">学生报名信息对象</param>
        /// <returns>返回受影响的行数</returns>
        public int SaveStudentSignUpInfo(StudentSignUpInfo ssi)
        {
            string sql = "insert into [tb_studentSignupInfo](studentName,IDCardNumber,gender,birthday,signupMajor,educationalBackground,userID,signupTime) values(@studentName,@IDCardNumber,@gender,@birthday,@signupMajor,@educationalBackground,@userID,@signupTime)";

            SqlParameter[] sp =
            {
                new SqlParameter("@studentName",           ssi.StudentName),
                new SqlParameter("@IDCardNumber",          ssi.IDCardNumber),
                new SqlParameter("@gender",                ssi.Gender),
                new SqlParameter("@birthday",              ssi.Birthday),
                new SqlParameter("@signupMajor",           ssi.SignupMajor),
                new SqlParameter("@educationalBackground", ssi.EducationalBackground),
                new SqlParameter("@userID",                ssi.UserID),
                new SqlParameter("@signupTime",            "getdate()")
            };
            return(Common.SQLHelper.ExecuteNonQuery(sql, sp));
        }
Example #2
0
 /// <summary>
 /// 检测保存是否成功
 /// </summary>
 /// <param name="ssi">学生信息对象</param>
 /// <returns></returns>
 public bool CheckSaveStudentSignUpInfo(StudentSignUpInfo ssi)
 {
     return(StudentSignUpInfoDAO.SaveStudentSignUpInfo(ssi) > 0);
 }