//this function remove board
        public InfoObject removeBoard(String boardName)
        {
            InfoObject info = null;

            if (boardName.Equals(lastBoardClosed.getBoardName()))
            {
                info = new InfoObject(false, "Can't remove the board you are working on currently");
                Log.Error("Board " + boardName + " hasn't been removed beacuse the user currently work on");
            }
            else
            {
                if (getBoards()[boardName] != null)
                {
                    getBoards().Remove(boardName);
                    DataLayerBoard2.deleteBoard(boardName, getEmail(), 0);
                    Log.Info("Board " + boardName + " has been removed");
                    info = new InfoObject(true, "Board " + boardName + " has been removed");
                }
                else
                {
                    info = new InfoObject(false, "Couldn't find the board to remove");
                    Log.Error("Board " + boardName + " hasn't been removed beacuse it's cant be found");
                }
            }
            return(info);
        }
        // this function return User object from the data layer.
        public static User getByEmail(string email)
        {
            UserD openedUser   = DataLayerUser2.open(email);
            User  returnedUser = null;

            if (openedUser != null)
            {
                returnedUser = new User(openedUser.getEmail(), openedUser.getPassword());
                returnedUser.setIsLoggedIn(openedUser.isLoggedIn());
                returnedUser.setNumberOfTasksAdded(openedUser.getNumOfTasksAdded());
                //returnedUser.setBoardsCollection(openedUser.getExistingBoards());

                LinkedList <BoardD> ListBoardD = DataLayerBoard2.Open(email);
                String boardsList = "";
                foreach (BoardD boardD in ListBoardD)
                {
                    Board b = new Board(email, boardD.getName());
                    b.setNumOfTasks(boardD.getNumberOfTasks());
                    b.open(email);
                    myBoards.Add(b.getBoardName(), b);
                    boardsList += "+" + boardD.getName();
                }
                returnedUser.setBoardsCollection(boardsList);
                returnedUser.setCurrBoard(openedUser.getLastBoard());
            }
            return(returnedUser);
        }
 // this function saves all taks data in a specific coulmn
 public void save()
 {
     for (int i = 1; i <= columnsHashTable.Count; i = i + 1)
     {
         Column column = (Column)columnsHashTable[i];
         column.save();
     }
     DataLayerBoard2.save(getBoardName(), boardID, getNumOfTasks());
 }