def edit_employee(id): employee = Employee.find_by_id(id) divisions = Division.find_all() prefectures = Prefecture.find_all() return render_template('edit_employee.html', employee=employee, divisions=divisions, prefectures=prefectures)
def delete_employee(id): errors = [] employee = Employee.find_by_id(id) Employee.delete(id) success = "データベースから社員(" + employee.name + ")を削除しました。" return render_template('result.html', success=success, errors=errors)