/// <summary>
        /// ��ͬ��Ȥ������
        /// </summary>
        /// <returns></returns>
        public IList<Core.Business.AccountExtend> GetInterFrendsByAccountExtend(CY.UME.Core.Business.AccountExtend uaccountex)
        {
            string sqlstr = "(Id>" + uaccountex.Id + " or Id<" + uaccountex.Id + ") ";
            if (!string.IsNullOrEmpty(uaccountex.Interest))
            {
                if (uaccountex.Interest.Contains(","))
                {
                    string[] Interst = uaccountex.Interest.Split(',');
                    if (Interst != null && Interst[0] != "")
                    {
                        sqlstr += " and (";
                        for (int i = 0; i < Interst.Length; i++)
                        {
                            if (i == Interst.Length - 1)
                            {
                                sqlstr += " Interest like '%" + Interst[i] + "%')";
                            }
                            else
                            {
                                sqlstr += " Interest like '%" + Interst[i] + "%' or ";
                            }
                        }
                    }
                }
                else
                {
                    sqlstr += " and Interest like '%"+uaccountex.Interest+"%' ";
                }
            }

            IList<Core.Business.AccountExtend> accountExtendlist = new List<Core.Business.AccountExtend>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            string sqlwhere = "SELECT top 21 * FROM [dbo].[AccountExtend] where ";
            sqlwhere += sqlstr + "and IsEmailChecked=1 ORDER BY [Id] desc";
            SqlDataReader reader = sql.ExecuteSqlReader(sqlwhere);

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.AccountExtend accountExtend = new Core.Business.AccountExtend();

                    if (!reader.IsDBNull(0)) accountExtend.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) accountExtend.Telephone = reader.GetString(1);
                    if (!reader.IsDBNull(2)) accountExtend.Birthday = reader.GetDateTime(2);
                    if (!reader.IsDBNull(3)) accountExtend.BirthYear = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) accountExtend.BirthMonth = reader.GetInt32(4);
                    if (!reader.IsDBNull(5)) accountExtend.BirthDate = reader.GetInt32(5);
                    if (!reader.IsDBNull(6)) accountExtend.Gender = reader.GetInt32(6);
                    if (!reader.IsDBNull(7)) accountExtend.Email = reader.GetString(7);
                    if (!reader.IsDBNull(8)) accountExtend.IsEmailChecked = reader.GetBoolean(8);
                    if (!reader.IsDBNull(9)) accountExtend.QQ = reader.GetString(9);
                    if (!reader.IsDBNull(10)) accountExtend.MSN = reader.GetString(10);
                    if (!reader.IsDBNull(11)) accountExtend.BloodType = reader.GetString(11);
                    if (!reader.IsDBNull(12)) accountExtend.LoveState = reader.GetInt32(12);
                    if (!reader.IsDBNull(13)) accountExtend.HometownProvinceId = reader.GetInt32(13);
                    if (!reader.IsDBNull(14)) accountExtend.HometownCityId = reader.GetInt32(14);
                    if (!reader.IsDBNull(15)) accountExtend.ResideProvinceId = reader.GetInt32(15);
                    if (!reader.IsDBNull(16)) accountExtend.ResideCityId = reader.GetInt32(16);
                    if (!reader.IsDBNull(17)) accountExtend.Theme = reader.GetString(17);
                    if (!reader.IsDBNull(18)) accountExtend.LibUserId = reader.GetInt64(18);
                    if (!reader.IsDBNull(19)) accountExtend.Password = reader.GetString(19);
                    if (!reader.IsDBNull(20)) accountExtend.UniversityId = reader.GetInt32(20);
                    if (!reader.IsDBNull(21)) accountExtend.CollegeId = reader.GetInt32(21);
                    if (!reader.IsDBNull(22)) accountExtend.MajorId = reader.GetInt32(22);
                    if (!reader.IsDBNull(23)) accountExtend.GradeId = reader.GetInt32(23);
                    if (!reader.IsDBNull(24)) accountExtend.InvitationLeft = reader.GetInt32(24);
                    if (!reader.IsDBNull(25)) accountExtend.Interest = reader.GetString(25);

                    accountExtend.MarkOld();
                    accountExtendlist.Add(accountExtend);
                }
                reader.Close();
            }
            return accountExtendlist;
        }
        public IList<Core.Business.AccountExtend> GetAllAccountExtend()
        {
            IList<Core.Business.AccountExtend> accountExtendlist = new List<Core.Business.AccountExtend>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            SqlDataReader reader = sql.ExecuteSPReader("USP_AccountExtend_SelectAll");

            if (reader != null)
            {
                while (reader.Read())
                {

                    Core.Business.AccountExtend accountExtend = new Core.Business.AccountExtend();

                    long id = reader.GetInt64(0);
                    accountExtend = Core.Business.AccountExtend.Load(id);

                    /*
                    if (!reader.IsDBNull(0)) accountExtend.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) accountExtend.BirthYear = reader.GetInt32(1);
                    if (!reader.IsDBNull(2)) accountExtend.BirthMonth = reader.GetInt32(2);
                    if (!reader.IsDBNull(3)) accountExtend.BirthDate = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) accountExtend.Gender = reader.GetInt32(4);
                    if (!reader.IsDBNull(5)) accountExtend.LoveState = reader.GetInt32(5);
                    if (!reader.IsDBNull(6)) accountExtend.HometownProvinceId = reader.GetInt32(6);
                    if (!reader.IsDBNull(7)) accountExtend.HometownCityId = reader.GetInt32(7);
                    if (!reader.IsDBNull(8)) accountExtend.ResideProvinceId = reader.GetInt32(8);
                    if (!reader.IsDBNull(9)) accountExtend.ResideCityId = reader.GetInt32(9);
                    if (!reader.IsDBNull(10)) accountExtend.Birthday = reader.GetDateTime(10);
                    if (!reader.IsDBNull(11)) accountExtend.IsEmailChecked = reader.GetBoolean(11);
                    if (!reader.IsDBNull(12)) accountExtend.Telephone = reader.GetString(12);
                    if (!reader.IsDBNull(13)) accountExtend.Email = reader.GetString(13);
                    if (!reader.IsDBNull(14)) accountExtend.QQ = reader.GetString(14);
                    if (!reader.IsDBNull(15)) accountExtend.MSN = reader.GetString(15);
                    if (!reader.IsDBNull(16)) accountExtend.BloodType = reader.GetString(16);
                    if (!reader.IsDBNull(17)) accountExtend.Theme = reader.GetString(17);
                    if (!reader.IsDBNull(18)) accountExtend.LibUserId = reader.GetInt64(18);
                    if (!reader.IsDBNull(19)) accountExtend.Password = reader.GetString(19);
                    */
                    accountExtend.MarkOld();
                    accountExtendlist.Add(accountExtend);
                }
                reader.Close();
            }
            return accountExtendlist;
        }