Ejemplo n.º 1
0
 public static TableLink LoadUnreadLink(IDataLayer forumConnection)
 {
     return(TableLink.Load(forumConnection,
                           new FieldBlank[] {
         DialogReadType.UserId,
         DialogReadType.Count
     },
                           new IndexBlank[] {
         DialogReadType.UnreadByUserId
     }, "",
                           "Select user_id, count(*) From dialogue",
                           "unread = 1 group by user_id"
                           ));
 }
Ejemplo n.º 2
0
 public static TableLink LoadCorrespondenceLink(IDataLayer forumConnection, string conditionWithoutWhere,
                                                params DbParameter[] conditionParameters)
 {
     return(TableLink.Load(forumConnection,
                           new FieldBlank[] {
         CorrespondenceType.Id,
         CorrespondenceType.UserId,
         CorrespondenceType.CollocutorId,
         CorrespondenceType.Inbox,
         CorrespondenceType.Content,
         CorrespondenceType.CreateTime
     },
                           new IndexBlank[] {
         CorrespondenceType.MessageById
     }, "",
                           "Select id, user_id, collocutor_id, inbox, content, create_time From correspondence",
                           conditionWithoutWhere, conditionParameters
                           ));
 }
Ejemplo n.º 3
0
 public static TableLink LoadDialogueLink(IDataLayer forumConnection, string conditionWithoutWhere,
                                          params DbParameter[] conditionParameters)
 {
     return(TableLink.Load(forumConnection,
                           new FieldBlank[] {
         DialogueType.Id,
         DialogueType.UserId,
         DialogueType.CollocutorId,
         DialogueType.Inbox,
         DialogueType.Content,
         DialogueType.ModifyTime,
         DialogueType.Unread
     },
                           new IndexBlank[] {
         DialogueType.DialogueById
     }, "",
                           "Select id, user_id, collocutor_id, inbox, content, modify_time, unread From dialogue",
                           conditionWithoutWhere, conditionParameters
                           ));
 }