Beispiel #1
0
 public static IList <PostEntity> GetThreadPosts(int tid)
 {
     return(EB <PostEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_post WHERE tid=@tid", new SqlParameter("@tid", tid)));
 }
Beispiel #2
0
 public static IList <ContentEntity> List(string tableName)
 {
     return(EB <ContentEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT * FROM " + tableName + " ORDER BY created DESC"));
 }
Beispiel #3
0
 //public IList<
 public static IList <BoardEntity> GetBoardList()
 {
     return(EB <BoardEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_board WHERE status=0 AND type=2"));
 }
Beispiel #4
0
 internal static IList <ThreadEntity> GetThreads()
 {
     return(EB <ThreadEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_thread ORDER BY created DESC"));
 }
Beispiel #5
0
 internal static IList <CYEntity> List(int count)
 {
     return(EB <CYEntity> .List(DBQA.DBCS_DICT_CY, CommandType.Text, "SELECT TOP " + count + " id, name,pinyinabbr FROM chengyu ORDER BY newid();"));
 }
Beispiel #6
0
 public static IList <QuestionEntity> List(int count)
 {
     return(EB <QuestionEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT TOP " + count + " id,authorid,good,likes,created,author,title FROM question ORDER BY created DESC"));
 }
Beispiel #7
0
 public IList <QuotationEntity> RandomList(int count)
 {
     return(EB <QuotationEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT TOP " + count + " * FROM quotation ORDER BY newid()"));
 }
Beispiel #8
0
 public static IList <UserCategoryEntity> GetUserCategories(int uid, string tableName)
 {
     return(EB <UserCategoryEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT id,pid,uid,name,count FROM " + tableName + " WHERE uid=@uid ORDER BY displayorder ASC,id ASC", new SqlParameter("@uid", uid)));
 }
Beispiel #9
0
 public static IList <CategoryEntity> GetTopCategories(string tableName)
 {
     return(EB <CategoryEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT id,pid,name,count FROM " + tableName + " WHERE pid=0 ORDER BY count DESC"));
 }