/// <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()); } }
/// <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()); } }
/// <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()); } }
/// <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()); } }
/// <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)); } }
/// <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()); } }