Ejemplo n.º 1
0
        /// <summary>
        /// 检查数据库得到的兴趣
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string CheckInterest(string userName)
        {
            User_dal  user     = new User_dal();
            DataTable dt       = user.GetPersonalInformation(userName);
            object    Interest = dt.Rows[0][5];

            if (Interest == null || Interest == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(Interest.ToString());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 检查数据库得到的学历
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string CheckEducationalBackground(string userName)
        {
            User_dal  user = new User_dal();
            DataTable dt   = user.GetPersonalInformation(userName);
            object    EducationalBackground = dt.Rows[0][4];

            if (EducationalBackground == null || EducationalBackground == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(EducationalBackground.ToString());
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///  检查数据库得到的手机号
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string CheckPhoneNumber(string userName)
        {
            User_dal  user        = new User_dal();
            DataTable dt          = user.GetPersonalInformation(userName);
            object    PhoneNumber = dt.Rows[0][3];

            if (PhoneNumber == null || PhoneNumber == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(PhoneNumber.ToString());
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 检查数据库得到的职业
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string CheckProfession(string userName)
        {
            User_dal  user       = new User_dal();
            DataTable dt         = user.GetPersonalInformation(userName);
            object    Profession = dt.Rows[0][2];

            if (Profession == null || Profession == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(Profession.ToString());
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 检查数据库得到的出生日期
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string CheckBirthDate(string userName)
        {
            User_dal  user      = new User_dal();
            DataTable dt        = user.GetPersonalInformation(userName);
            object    BirthDate = dt.Rows[0][1];

            if (BirthDate == null || BirthDate == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(String.Format("{0:yyyy\\/MM\\/dd}", BirthDate));
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 检查数据库得到的真实姓名
        /// </summary>
        /// <param name="useName"></param>
        /// <returns></returns>
        public string CheckRealName(string userName)
        {
            User_dal  user     = new User_dal();
            DataTable dt       = user.GetPersonalInformation(userName);
            object    RealName = dt.Rows[0][0];

            if (RealName == null || RealName == System.DBNull.Value)
            {
                return(null);
            }
            else
            {
                return(RealName.ToString());
            }
        }