Ejemplo n.º 1
0
 def __init__(self):
     print("help : コマンド一覧")
     print("info [id] : 予約している人の情報表示")
     print("guests :  予約している人全員の情報を表示")
     print("change [id] [変更する行] [変更内容] : 既存のデータを変更")
     print("end : 初期画面に戻る")
     print("\n")
     rootCommand.rootCommand().root_command()
Ejemplo n.º 2
0
    def check(self, number, cmd):
        """

        :param number: List[int, int, ・・・]
        :param cmd: int
        :rtype: int
        """

        if number[0] == cmd:
            # 予約
            self.reservation.check_info()

        elif number[1] == cmd:
            # キャンセル
            self.cancel.cancel()

        elif cmd == 9999:
            #管理者
            print("管理者モード有効")
            root = rootCommand.rootCommand()
            root.root_command()

        else:
            print(self.config_instance.getMessage(self.path, "check-failed"))
            self.whatCheck()
Ejemplo n.º 3
0
    def __init__(self):
        self.root = rootCommand.rootCommand()
        self.db = SQLiteProvider.SQLite()

        for row in self.db.getGuests():
            print(row)

        print("\n")

        self.root.root_command()
Ejemplo n.º 4
0
    def __init__(self, index):
        """

        :param index: list
        """
        self.root = rootCommand.rootCommand()
        self.db = SQLiteProvider.SQLite()

        data = self.db.getGuest(index[1])
        print(data)
        print("\n")

        self.root.root_command()
Ejemplo n.º 5
0
    def __init__(self, index):
        """

        :param index: list
        """
        self.root = rootCommand.rootCommand()
        self.db = SQLiteProvider.SQLite()
        self.config = Config.Config()

        if self.db.id_exist(index[1]):
            if index[2] == "name":
                print("a")
                self.db.setName(id, index[3])
                print(self.config.getMessage(config_ini_path,
                                             "change-success"))

            elif index[2] == "age":
                self.db.setAge(id, index[3])
                print(self.config.getMessage(config_ini_path,
                                             "change-success"))

            elif index[2] == "sex":
                self.db.setSex(id, index[3])
                print(self.config.getMessage(config_ini_path,
                                             "change-success"))

            elif index[2] == "number":
                self.db.setNumber(id, index[3])
                print(self.config.getMessage(config_ini_path,
                                             "change-success"))

            else:
                print(self.config.getMessage(config_ini_path, "miss-first"))

            self.db.saveDB()
        else:
            print("そのIDの人はいません")

        print("\n")

        self.root.root_command()