public BoardSetting(string board_id) { BoardId = board_id; BoardName = Warehouse.BsMapPond.Get().GetBoardName(board_id); string flags = BoardInfoStore.GetBoardFlags(board_id); this.LowKey = SandFlags.Check(flags, SandFlags.MT_LOW_KEY, 1); #if ACCOUNT_USING_SQL g10 = GroupStore.GetBoardGroup(board_id, GroupStore.ChairOwnerGroupName, out g10UserIds); g11 = GroupStore.GetBoardGroup(board_id, GroupStore.ViceOwnerGroupName, out g11UserIds); g12 = GroupStore.GetBoardGroup(board_id, GroupStore.InsiderGroupName, out g12UserIds); #endif // Output = JsonConvert.SerializeObject(this); // the ","Output":null" will also be written into Output. }
public BsMap() { StringWriter writer = new StringWriter(); writer.WriteStartTag("nav"); BoardInfoStore.GetBoards((board_id, board_name) => { if (uint.Parse(board_id.Substring(1)) >= 1149) { writer.WriteBoardAnchor(board_id, board_name); } getBoardInfo(board_id).Name = board_name; }); writer.WriteEndTag("nav"); // writer.WriteStartTag("aside"); SelectionInfoStore.GetSelections((selection_id, selection_name, board_list) => { if (uint.Parse(selection_id.Substring(1)) >= 1027) { writer.WriteStartTag("nav"); writer.WriteBoardAnchor(selection_id, selection_name); writer.WriteForCrawler("footer", board_list); writer.WriteEndTag("nav"); } // BsInfo sel_info = getSelectionInfo(selection_id); sel_info.Name = selection_name; SandId.SplitWithCallback2(board_list, ',', board_id => { this.boardInfoDict[board_id].IdList.Add(selection_id); // if the board id does not exist, throw exception. sel_info.IdList.Add(board_id); }); }); writer.WriteEndTag("aside"); this.Output = writer.ToString(); }
public static object GetDiscussionList(string board_id) { List <string> discussion_id_list = new List <string>(); List <string> discussion_heading_list = new List <string>(); GetLastDiscussions(board_id, 100, entity => { discussion_heading_list.Add(entity["heading"].StringValue); discussion_id_list.Add(entity.RowKey); }); // string board_name = BoardInfoStore.GetBoardName(board_id); return(new { discussion_id_list = discussion_id_list.ToArray(), discussion_heading_list = discussion_heading_list.ToArray(), board_name = board_name, gen_time = Util.DateTimeToString(DateTime.Now, 1) }); }
public static void InitializeTable() { SiteTable = getTable("sites1"); if (SiteTable != null) { SiteTable.CreateIfNotExists(); } // TemporalTable = getTable("temporal1"); if (TemporalTable != null) { TemporalTable.CreateIfNotExists(); } RevisionTable = getTable("revision1"); if (RevisionTable != null) { RevisionTable.CreateIfNotExists(); } ImagesContainer = getContainer("images1"); SelectionListTable = getTable("selectionlist1"); if (SelectionListTable != null) { SelectionListTable.CreateIfNotExists(); SelectionInfoStore.CreateSkeleton(); } HistoryTable = getTable("history1"); if (HistoryTable != null) { HistoryTable.CreateIfNotExists(); } BoardListTable = getTable("boardlist1"); if (BoardListTable != null) { BoardListTable.CreateIfNotExists(); BoardInfoStore.CreateSkeleton(); } DiscussionListTable = getTable("discussionlist1"); if (DiscussionListTable != null) { DiscussionListTable.CreateIfNotExists(); } KeyStoreTable = getTable("keystore1"); if (KeyStoreTable != null) { KeyStoreTable.CreateIfNotExists(); } ActivityTable = getTable("activity1"); if (ActivityTable != null) { ActivityTable.CreateIfNotExists(); } DiscussionLoadTable = getTable("discussionload1"); if (DiscussionLoadTable != null) { DiscussionLoadTable.CreateIfNotExists(); } VoteBookTable = getTable("votebook1"); if (VoteBookTable != null) { VoteBookTable.CreateIfNotExists(); } }