Example #1
0
 def addCategory(self, p_CategoryTitle):
     category = Category(p_CategoryTitle)
     
     session = self.session()
     session.save(category)
     session.commit()
     
     return category.id
Example #2
0
    def addTask(self, p_TaskText, p_CategoryId):
        task = Task(p_TaskText, p_CategoryId)
        
        session = self.session()
        session.save(task)
        session.commit()

        return task.id