private void LoadEmail(string id)
        {
            int emailId   = int.Parse(id);
            var emailList = _messageDal.GetMessage(emailId);

            rptEmail.DataSource = emailList;
            rptEmail.DataBind();
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Message GetMessage(int id)
        {
            Message m = null;

            dal.GetMessage(id, reader =>
            {
                if (reader.HasRows)
                {
                    m = reader.ToEntity <Message>();
                }
            });
            return(m);
        }