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); }
// 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); }
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); }
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); }
/// <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); }
public ViewtMessage GettMessageOnly(int Touid, int FromUid, int ParentID) { return(ViewtMessage.ToViewModel(Repository.GettMessageOnly(Touid, FromUid, ParentID))); }
public ViewtMessage GettMessageDistinct(int Touid, string strContent, int FromUid, int ParentID) { return(ViewtMessage.ToViewModel(Repository.GettMessageDistinct(Touid, strContent, FromUid, ParentID))); }
public ViewtMessage GettMessageById(int id) { return(ViewtMessage.ToViewModel(Repository.GettMessageById(id))); }