/// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(MessageViewME model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into messageView(");
            strSql.Append("happenTime,messageID,messageContent,messageType,dynamicContent)");
            strSql.Append(" values (");
            strSql.Append("@happenTime,@messageID,@messageContent,@messageType,@dynamicContent)");
            SqlParameter[] parameters = {
                    new SqlParameter("@happenTime", SqlDbType.DateTime),
                    new SqlParameter("@messageID", SqlDbType.Int,4),
                    new SqlParameter("@messageContent", SqlDbType.VarChar,255),
                    new SqlParameter("@messageType", SqlDbType.Int,4),
                    new SqlParameter("@dynamicContent", SqlDbType.NVarChar,255)};
            parameters[0].Value = model.happenTime;
            parameters[1].Value = model.messageID;
            parameters[2].Value = model.messageContent;
            parameters[3].Value = model.messageType;
            parameters[4].Value = model.dynamicContent;

            int rows = _dbAssist.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(MessageViewME model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update messageView set ");
            strSql.Append("happenTime=@happenTime,");
            strSql.Append("messageID=@messageID,");
            strSql.Append("messageContent=@messageContent,");
            strSql.Append("messageType=@messageType,");
            strSql.Append("dynamicContent=@dynamicContent");
            strSql.Append(" where happenTime=@happenTime ");
            SqlParameter[] parameters = {
                    new SqlParameter("@happenTime", SqlDbType.DateTime),
                    new SqlParameter("@messageID", SqlDbType.Int,4),
                    new SqlParameter("@messageContent", SqlDbType.VarChar,255),
                    new SqlParameter("@messageType", SqlDbType.Int,4),
                    new SqlParameter("@dynamicContent", SqlDbType.NVarChar,255)};
            parameters[0].Value = model.happenTime;
            parameters[1].Value = model.messageID;
            parameters[2].Value = model.messageContent;
            parameters[3].Value = model.messageType;
            parameters[4].Value = model.dynamicContent;

            int rows = _dbAssist.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MessageViewME GetModel(DateTime happenTime)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select  top 1 happenTime,messageID,messageContent,messageType,dynamicContent from messageView ");
            strSql.Append(" where happenTime=@happenTime ");
            SqlParameter[] parameters = {
                    new SqlParameter("@happenTime", SqlDbType.DateTime)			};
            parameters[0].Value = happenTime;

            MessageViewME model = new MessageViewME();
            DataSet ds = _dbAssist.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["happenTime"] != null && ds.Tables[0].Rows[0]["happenTime"].ToString() != "")
                {
                    model.happenTime = DateTime.Parse(ds.Tables[0].Rows[0]["happenTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["messageID"] != null && ds.Tables[0].Rows[0]["messageID"].ToString() != "")
                {
                    model.messageID = int.Parse(ds.Tables[0].Rows[0]["messageID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["messageContent"] != null && ds.Tables[0].Rows[0]["messageContent"].ToString() != "")
                {
                    model.messageContent = ds.Tables[0].Rows[0]["messageContent"].ToString();
                }
                if (ds.Tables[0].Rows[0]["messageType"] != null && ds.Tables[0].Rows[0]["messageType"].ToString() != "")
                {
                    model.messageType = int.Parse(ds.Tables[0].Rows[0]["messageType"].ToString());
                }
                if (ds.Tables[0].Rows[0]["dynamicContent"] != null && ds.Tables[0].Rows[0]["dynamicContent"].ToString() != "")
                {
                    model.dynamicContent = ds.Tables[0].Rows[0]["dynamicContent"].ToString();
                }
                return model;
            }
            else
            {
                return null;
            }
        }