Exemple #1
0
        public static Board CreateBoard(String title)
        {
            Board board = new Board(title);

            board.addNewColumn("backlog", board.title);
            board.addNewColumn("inProccess", board.title);
            board.addNewColumn("done", board.title);
            boards.Add(board);
            datboards.Add(new DatBoard(title));
            BoardHandler.saveBoards(datboards);
            return(board);
        }
        public static Board CreateBoard(string userName, String boardId)
        {
            Board board = new Board(index, userName, boardId);

            board.addNewColumn("backlog", board.boardId);
            board.addNewColumn("inProccess", board.boardId);
            board.addNewColumn("done", board.boardId);
            boards.Add(board);
            BoardHandler.addBoard(index, userName, boardId);
            index++;
            return(board);
        }
        public static void datBoardToBoard()
        {
            List <DatBoard> datboards = BoardHandler.getBoard();

            Column.datColToCol();
            if (datboards != null)
            {
                foreach (DatBoard dat in datboards)
                {
                    Board tmpBoard = new Board(dat.getIndex(), dat.getUserName(), dat.getDatBoardId());
                    tmpBoard.columnList = Column.getColumnById(tmpBoard.boardId, tmpBoard.userName);
                    boards.Add(tmpBoard);
                }
            }
            index = BoardHandler.getIndex();
        }
        public static bool removeBoard(Board b, string userName)
        {
            boards.Remove(b);
            if (BoardHandler.deletBoard(b.boardIndex, userName, b.boardId))
            {
                foreach (Column c in b.columnList)
                {
                    Column.DeleteColumn(c, userName);
                }
                log.Info("board deleted successfuly: " + b.boardId);
                return(true);
            }


            log.Error("could delete the board: " + b.boardId);
            return(false);
        }
Exemple #5
0
 public static void datBoardToBoard()
 {
     Board.datboards = BoardHandler.getBoard();
     Column.datColToCol();
     if (Board.datboards != null)
     {
         foreach (DatBoard dat in Board.datboards)
         {
             Board tmpBoard = new Board(dat.getDatBoardId());
             tmpBoard.columnList = Column.getColumnById(tmpBoard.title);
             boards.Add(tmpBoard);
         }
     }
     else
     {
         Board.datboards = new List <DatBoard>();
     }
 }