예제 #1
0
    def teamsBoard(self):
        self.db.commit()
        BOARD = Board.Board_Manager(self.team_ID, self.db, self.user_ID)
        self.clear()
        print("----------Team's Board------------")
        sql = "select Board_ID, Board_Title from Board \
            Where Team_ID = '%s'" % self.team_ID
        self.cursor.execute(sql)
        boards = self.cursor.fetchall()
        i = 1
        for board in boards:
            print("● %d. %s" % (i, board[1]))
            i = i + 1
        print("----------------------------------")
        print(" + : Create Board")
        print(" 0 : Back")

        choice = (input("Enter Board number : "))
        if (choice == "0"):
            self.selectTeam()
        elif (choice == "+"):
            BOARD.board_create()
            print("board_create")
            self.teamsBoard()
        elif (int(choice) <= len(boards) and int(choice) != 0):
            #  new_Team_ID, new_Board_ID, db, new_User_ID)
            c = int(choice)
            Board_Specific.Specific_Board_Manager(self.team_ID,
                                                  boards[c - 1][0], self.db,
                                                  self.user_ID)
            print("board specific")
        else:
            print("Wrong input. Enter again.")
            self.teamsBoard()
예제 #2
0
 def board(self):
     print("SQL about board")
     BOARD = Board.Board_Manager(-1, self.db, self.user_ID)
     BOARD.start()