Error 1 The type 'SpaceBuilder.Common.IRateable' is defined in an assembly that is not referenced. You must add a reference to assembly 'SpaceBuilder.Service, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null'. D:\我的项目\WpfPhoto\WpfPhoto\WpfPhoto\PhotoClass.cs 22 34 WpfPhoto
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SpaceBuilder.Photo;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Collections;namespace WpfPhoto
{
    class PhotoClass
    {
        SqlCommon common = new SqlCommon();
        public void OpenServer()
        {
            string strCon = common.strCon = "server=192.168.1.41;uid=sa;pwd=sa;database=shi1DB";
            common.ConSqlserver(strCon);
        }
        
        public List<PhotoThread> GetPhotoAlone(int top, int siteCategoryID)
        {
            List<PhotoThread> listPhoto = new List<PhotoThread>();            //获取人气单品
            SqlParameter[] arrSqlParameters = new SqlParameter[] { new SqlParameter("@Top", top), new SqlParameter("@SiteCategoryID", siteCategoryID) };
            SqlDataReader dr = common.GetDataReader("Pro_PhotosAlone_new_Get", CommandType.StoredProcedure);
            if (dr.Read())
            {
                PhotoThread photoThreadAlone = new PhotoThread();
                DataTable tblPhoto = dr.GetSchemaTable();
                int rows = tblPhoto.Rows.Count;
                for (int i = 0; i < rows; i++)
                {
                    photoThreadAlone.ThreadID = (int)tblPhoto.Rows[i]["ThreadID"];
                    photoThreadAlone.UserCategoryID = (int)tblPhoto.Rows[i]["UserCategoryID"];
                    photoThreadAlone.SiteCategoryID = (int)tblPhoto.Rows[i]["SiteCategoryID"];
                    photoThreadAlone.Author = (string)tblPhoto.Rows[i]["Author"];
                    photoThreadAlone.PostDate = (DateTime)tblPhoto.Rows[i]["PostDate"];
                    photoThreadAlone.LastRepliedDate = (DateTime)tblPhoto.Rows[i]["LastRepliedDate"];
                    photoThreadAlone.IsLocked = (bool)tblPhoto.Rows[i]["IsLocked"];
                    photoThreadAlone.AuditingStatus = (int)tblPhoto.Rows[i]["AuditingStatus"];
                    photoThreadAlone.IsEssential = (bool)tblPhoto.Rows[i]["IsEssential"];
                    photoThreadAlone.SpecialOrder = (int)tblPhoto.Rows[i]["SpecialOrder"];
                    photoThreadAlone.StickyDate = (DateTime)tblPhoto.Rows[i]["StickyDate"];
                    photoThreadAlone.HitTimes = (int)tblPhoto.Rows[i]["HitTimes"];
                    photoThreadAlone.CommentCount = (int)tblPhoto.Rows[i]["CommentCount"];
                    photoThreadAlone.RssViewTimes = (int)tblPhoto.Rows[i]["RssViewTimes"];
                    photoThreadAlone.RatingSum = (int)tblPhoto.Rows[i]["RatingSum"];
                    photoThreadAlone.TotalRatings = (int)tblPhoto.Rows[i]["TotalRatings"];
                    photoThreadAlone.Subject = (string)tblPhoto.Rows[i]["Subject"];
                    photoThreadAlone.UserHostAddress = (string)tblPhoto.Rows[i]["UserHostAddress"];
                    // photoThreadAlone.Body = (string)tblPhoto.Rows[i]["Body"];
                    // photoThread.PropertyValues = (string)tblPhoto.Rows[i]["PropertyValues"];
                    // photoThread.PropertyNames = (string)tblPhoto.Rows[i]["PropertyNames"];
                    // photoThread.Width = (int)tblPhoto.Rows[i]["Width"];
                    // photoThread.ContentSize = (string)tblPhoto.Rows[i]["ContentSize"];
                    // photoThread.Height = (int)tblPhoto.Rows[i]["Height"];
                    // photoThread.ContentType = (string)tblPhoto.Rows[i]["ContentType"];
                    // photoThread.FileName = (string)tblPhoto.Rows[i]["FileName"];
                    // photoThread.Password = (string)tblPhoto.Rows[i]["Password"];
                    // photoThread.PrivacyStatus = (int)tblPhoto.Rows[i]["PrivacyStatus"];
                }
                listPhoto.Add(photoThreadAlone);
               
            }
            return listPhoto;
        }
    }
}