예제 #1
0
    def save(**kwargs):
        client = Client()
        client.name = kwargs['name']
        client.email = kwargs['email']

        save_command = SaveCommand()
        result = save_command.execute(client)

        return render_template('insert.html', message=result.result)
예제 #2
0
    def update(**kwargs):
        client = Client()
        client.id = kwargs['id']
        client.name = kwargs['name']
        client.email = kwargs['email']

        update_command = UpdateCommand()
        result = update_command.execute(client)

        return render_template('index.html', message=result.result)