private const string GetmessagesSQL
            //= "select Message.M_Id, Message.M_Name, Message.Subject, Message.Face, Message.Content, Message.datetime, Reply.ReplyId, Reply.ReplyContent, Reply.Datetime  from Message inner join Reply on Message.M_Id=Reply.M_Id";
            = "select M_Id, M_Name, Subject, Face, Content, datetime from Message;select  Reply.ReplyId, Reply.ReplyContent, Reply.Datetime  from Message inner join Reply on Message.M_Id=Reply.M_Id"; 
             
        public List<Liuyanban.Model.showmessageInfo> Getmessages()
        {            List<Liuyanban.Model.showmessageInfo> list = new List<Liuyanban.Model.showmessageInfo>();
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                SqlCommand command = new SqlCommand(GetmessagesSQL, connection);
                connection.Open();                SqlDataReader reader= command.ExecuteReader();
                while (reader.Read())
                {
                    Liuyanban.Model.showmessageInfo Getmessages = new Liuyanban.Model.showmessageInfo()
                    {
                        M_Id = reader.GetInt32(0),
                        M_Name = reader.GetString(1),
                        Subject = reader.GetString(2),
                        Face = reader.GetString(3),
                        Content = reader.GetString(4),
                        datetime = reader.GetDateTime(5),                        //ReplyId = reader.GetInt32(6),
                        //ReplyContent = reader.GetString(7),
                        //Datetime = reader.GetDateTime(8)                        ReplyId = reader.GetInt32(0),
                        ReplyContent = reader.GetString(1),
                        Datetime = reader.GetDateTime(2)
                    };
                    list.Add(Getmessages);                }                return list;
            }        }//////////////////提示错误处
 Liuyanban.Model.showmessageInfo Getmessages = new Liuyanban.Model.showmessageInfo()