コード例 #1
0
ファイル: BoardAPI.cs プロジェクト: SuperTeamR/BulletinApp
        /// <summary>   Получает все буллетины с борды. </summary>
        ///
        /// <remarks>   SV Milovanov, 30.01.2018. </remarks>
        ///
        /// <param name="boardId">  . </param>
        ///-------------------------------------------------------------------------------------------------

        public static void GetBulletins(string boardId)
        {
            _DCT.Execute(data =>
            {
                var boardContainer = BoardContainerList.Get(boardId);
                boardContainer.GetBulletins();
            });
        }
コード例 #2
0
ファイル: BoardAPI.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Edit from XLS. </summary>
        ///
        /// <remarks>   SV Milovanov, 30.01.2018. </remarks>
        ///
        /// <param name="boardId">  . </param>
        ///-------------------------------------------------------------------------------------------------

        public static void EditFromXls(string boardId)
        {
            _DCT.Execute(data =>
            {
                var boardContainer = BoardContainerList.Get(boardId);
                boardContainer.EditFromXls();
            });
        }
コード例 #3
0
ファイル: BoardAPI.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>
        /// Проверяем целостность данных
        /// - Парсит категории
        /// - Парсит поля.
        /// </summary>
        ///
        /// <remarks>   SV Milovanov, 30.01.2018. </remarks>
        ///
        /// <param name="boardId">  . </param>
        ///-------------------------------------------------------------------------------------------------

        public static void CheckIntegrity(string boardId)
        {
            _DCT.Execute(data =>
            {
                var boardContainer = BoardContainerList.Get(boardId);
                var groups         = boardContainer.LoadGroups();
                var s = DataSerializer.Serialize(groups);
            });
        }
コード例 #4
0
ファイル: BoardApi.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Генерирует xls с имеющимися буллетинами </summary>
        ///
        /// <remarks>   SV Milovanov, 05.02.2018. </remarks>
        ///
        /// <param name="boardName">    Name of the board. </param>
        ///-------------------------------------------------------------------------------------------------

        public static void GetXlsBulletins(string boardName)
        {
            DCT.Execute(data =>
            {
                var board          = data.Db1.Boards.FirstOrDefault(q => q.Name == boardName);
                var boardContainer = BoardContainerList.Get(board.Id);
                //boardContainer.GetXlsBulletins();
            });
        }
コード例 #5
0
ファイル: BoardApi.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>
        /// Проверяем целостность данных
        /// - Парсит категории
        /// - Парсит поля.
        /// </summary>
        ///
        /// <remarks>   SV Milovanov, 30.01.2018. </remarks>
        ///
        /// <param name="boardId">  . </param>
        ///-------------------------------------------------------------------------------------------------

        public static void CheckIntegrity(string boardName)
        {
            DCT.Execute(data =>
            {
                var board          = data.Db1.Boards.FirstOrDefault(q => q.Name == boardName);
                var boardContainer = BoardContainerList.Get(board.Id);
                boardContainer.ReloadGroups();
            });
        }
コード例 #6
0
ファイル: BoardApi.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Gets XLS group. </summary>
        ///
        /// <remarks>   SV Milovanov, 06.02.2018. </remarks>
        ///
        /// <param name="boardName">    Name of the board. </param>
        ///-------------------------------------------------------------------------------------------------

        public static void GetXlsGroup(string boardName)
        {
            DCT.Execute(data =>
            {
                var board          = data.Db1.Boards.FirstOrDefault(q => q.Name == boardName);
                var boardContainer = BoardContainerList.Get(board.Id);
                var signature      = new GroupSignature("Хобби и отдых", "Спорт и отдых", "Другое");
                // boardContainer.GetXlsGroup(signature);
            });
        }
コード例 #7
0
ファイル: BoardAPI.cs プロジェクト: SuperTeamR/BulletinApp
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Генерация excel-файла для выбранной доски и сигнатуры группы. </summary>
        ///
        /// <remarks>   SV Milovanov, 30.01.2018. </remarks>
        ///
        /// <param name="boardId">  . </param>
        ///
        /// <returns>   An array of byte. </returns>
        ///-------------------------------------------------------------------------------------------------

        public static byte[] GenerateXls(string boardId)
        {
            _DCT.Execute(data =>
            {
                var boardContainer = BoardContainerList.Get(boardId);
                var group          = new GroupSignature("Транспорт", "Автомобили", "С пробегом");
                var s = boardContainer.GenerateXlsFromGroup(group);
            });

            return(null);
        }