コード例 #1
0
        public List <ViewtMessage> GettMessageParentID(int ParentID)
        {
            List <tMessage> list = Repository.GettMessageParentID(ParentID);

            List <ViewtMessage> model = new List <ViewtMessage>();

            foreach (var item in list)
            {
                model.Add(ViewtMessage.ToViewModel(item));
            }
            return(model);
        }
コード例 #2
0
        //
        public List <ViewtMessage> GetByMessageFromUid(int toType, int id, int ParentID)
        {
            List <tMessage> list = Repository.GetByMessageFromUid(toType, id, ParentID);

            List <ViewtMessage> model = new List <ViewtMessage>();

            foreach (var item in list)
            {
                model.Add(ViewtMessage.ToViewModel(item));
            }
            return(model);
        }
コード例 #3
0
        public List <ViewtMessage> GettMessageUid(int id, int toType)
        {
            List <tMessage> list = Repository.GettMessageUid(id, toType);

            List <ViewtMessage> model = new List <ViewtMessage>();

            foreach (var item in list)
            {
                model.Add(ViewtMessage.ToViewModel(item));
            }
            return(model);
        }
コード例 #4
0
        public List <ViewtMessage> GetPageListWhereFormUidAndloginType(int uid, int loginType, out int count)
        {
            List <tMessage> list = Repository.GetPageListWhereFormUidAndloginType(uid, loginType, out count);

            List <ViewtMessage> model = new List <ViewtMessage>();

            foreach (var item in list)
            {
                model.Add(ViewtMessage.ToViewModel(item));
            }
            return(model);
        }
コード例 #5
0
        /// <summary>
        /// 留言列表按id和类型分页
        /// </summary>
        public List <ViewtMessage> GettMessageUidList(int id, int totype, int page, int pagesize, out int count)
        {
            List <tMessage> list = Repository.GettMessageUidList(id, totype, page, pagesize, out count);

            List <ViewtMessage> model = new List <ViewtMessage>();

            foreach (var item in list)
            {
                model.Add(ViewtMessage.ToViewModel(item));
            }
            return(model);
        }
コード例 #6
0
 public ViewtMessage GettMessageOnly(int Touid, int FromUid, int ParentID)
 {
     return(ViewtMessage.ToViewModel(Repository.GettMessageOnly(Touid, FromUid, ParentID)));
 }
コード例 #7
0
 public ViewtMessage GettMessageDistinct(int Touid, string strContent, int FromUid, int ParentID)
 {
     return(ViewtMessage.ToViewModel(Repository.GettMessageDistinct(Touid, strContent, FromUid, ParentID)));
 }
コード例 #8
0
 public ViewtMessage GettMessageById(int id)
 {
     return(ViewtMessage.ToViewModel(Repository.GettMessageById(id)));
 }