public IList<Core.Business.ExhibitionInstrument> GetExhibitionInstrumentByPage(string sqlwhere, int pagenumber, int pagesize)
        {
            IList<Core.Business.ExhibitionInstrument> exhibitionInstrumentlist = new List<Core.Business.ExhibitionInstrument>();
            SqlServerUtility sql = new SqlServerUtility();
            sql.AddParameter("@Tables", SqlDbType.VarChar, "ExhibitionInstrument");
            sql.AddParameter("@PK", SqlDbType.VarChar, "Id");
            sql.AddParameter("@PageNumber", SqlDbType.Int, pagenumber);
            sql.AddParameter("@PageSize", SqlDbType.Int, pagesize);
            //sql.AddParameter("@LawSortID", SqlDbType.UniqueIdentifier, sortId);
            sql.AddParameter("@Filter", SqlDbType.VarChar, sqlwhere);
            SqlDataReader reader = sql.ExecuteSPReader("Paging_RowCount");
            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.ExhibitionInstrument exhibitionInstrument = new Core.Business.ExhibitionInstrument();

                    if (!reader.IsDBNull(0)) exhibitionInstrument.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) exhibitionInstrument.InstrumentID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) exhibitionInstrument.ExhibitionDate = reader.GetDateTime(2);
                    if (!reader.IsDBNull(3)) exhibitionInstrument.SequenceNumber = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) exhibitionInstrument.IsShowinHomePage = reader.GetInt32(4);

                    exhibitionInstrument.MarkOld();
                    exhibitionInstrumentlist.Add(exhibitionInstrument);
                }
                reader.Close();
            }
            return exhibitionInstrumentlist;
        }
        public IList<Core.Business.ExhibitionInstrument> GetAllExhibitionInstrument(string strWhere)
        {
            IList<Core.Business.ExhibitionInstrument> exhibitionInstrumentlist = new List<Core.Business.ExhibitionInstrument>();
            SqlServerUtility sql = new SqlServerUtility();
            string sqlSelAll = "SELECT ExhibitionInstrument.[Id],[InstrumentID],[ExhibitionDate],[SequenceNumber],[IsShowinHomePage]FROM [dbo].[ExhibitionInstrument]";
            sqlSelAll += strWhere;
            SqlDataReader reader = sql.ExecuteSqlReader(sqlSelAll);

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.ExhibitionInstrument exhibitionInstrument = new Core.Business.ExhibitionInstrument();

                    if (!reader.IsDBNull(0)) exhibitionInstrument.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) exhibitionInstrument.InstrumentID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) exhibitionInstrument.ExhibitionDate = reader.GetDateTime(2);
                    if (!reader.IsDBNull(3)) exhibitionInstrument.SequenceNumber = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) exhibitionInstrument.IsShowinHomePage = reader.GetInt32(4);

                    exhibitionInstrument.MarkOld();
                    exhibitionInstrumentlist.Add(exhibitionInstrument);
                }
                reader.Close();
            }
            return exhibitionInstrumentlist;
        }
        public IList <Core.Business.ExhibitionInstrument> GetExhibitionInstrumentByPage(string sqlwhere, int pagenumber, int pagesize)
        {
            IList <Core.Business.ExhibitionInstrument> exhibitionInstrumentlist = new List <Core.Business.ExhibitionInstrument>();
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Tables", SqlDbType.VarChar, "ExhibitionInstrument");
            sql.AddParameter("@PK", SqlDbType.VarChar, "Id");
            sql.AddParameter("@PageNumber", SqlDbType.Int, pagenumber);
            sql.AddParameter("@PageSize", SqlDbType.Int, pagesize);
            //sql.AddParameter("@LawSortID", SqlDbType.UniqueIdentifier, sortId);
            sql.AddParameter("@Filter", SqlDbType.VarChar, sqlwhere);
            SqlDataReader reader = sql.ExecuteSPReader("Paging_RowCount");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.ExhibitionInstrument exhibitionInstrument = new Core.Business.ExhibitionInstrument();

                    if (!reader.IsDBNull(0))
                    {
                        exhibitionInstrument.Id = reader.GetGuid(0);
                    }
                    if (!reader.IsDBNull(1))
                    {
                        exhibitionInstrument.InstrumentID = reader.GetGuid(1);
                    }
                    if (!reader.IsDBNull(2))
                    {
                        exhibitionInstrument.ExhibitionDate = reader.GetDateTime(2);
                    }
                    if (!reader.IsDBNull(3))
                    {
                        exhibitionInstrument.SequenceNumber = reader.GetInt32(3);
                    }
                    if (!reader.IsDBNull(4))
                    {
                        exhibitionInstrument.IsShowinHomePage = reader.GetInt32(4);
                    }

                    exhibitionInstrument.MarkOld();
                    exhibitionInstrumentlist.Add(exhibitionInstrument);
                }
                reader.Close();
            }
            return(exhibitionInstrumentlist);
        }
        public IList <Core.Business.ExhibitionInstrument> GetExhibitionInstrumentTopBySequenceNumber(int num)
        {
            IList <Core.Business.ExhibitionInstrument> exhibitionInstrumentlist = new List <Core.Business.ExhibitionInstrument>();
            SqlServerUtility sql       = new SqlServerUtility();
            string           sqlSelAll = "SELECT top " + num + " ExhibitionInstrument.[Id],[InstrumentID],[ExhibitionDate],[SequenceNumber],[IsShowinHomePage]FROM [dbo].[ExhibitionInstrument]";

            sqlSelAll += "order by SequenceNumber ASC";
            SqlDataReader reader = sql.ExecuteSqlReader(sqlSelAll);

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.ExhibitionInstrument exhibitionInstrument = new Core.Business.ExhibitionInstrument();

                    if (!reader.IsDBNull(0))
                    {
                        exhibitionInstrument.Id = reader.GetGuid(0);
                    }
                    if (!reader.IsDBNull(1))
                    {
                        exhibitionInstrument.InstrumentID = reader.GetGuid(1);
                    }
                    if (!reader.IsDBNull(2))
                    {
                        exhibitionInstrument.ExhibitionDate = reader.GetDateTime(2);
                    }
                    if (!reader.IsDBNull(3))
                    {
                        exhibitionInstrument.SequenceNumber = reader.GetInt32(3);
                    }
                    if (!reader.IsDBNull(4))
                    {
                        exhibitionInstrument.IsShowinHomePage = reader.GetInt32(4);
                    }

                    exhibitionInstrument.MarkOld();
                    exhibitionInstrumentlist.Add(exhibitionInstrument);
                }
                reader.Close();
            }
            return(exhibitionInstrumentlist);
        }