Beispiel #1
0
 private async Task CreateBoolTypeUserTaskTableAsync(TaskHolder taskHolder)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         await cnn.ExecuteAsync(@$ "CREATE TABLE {taskHolder.Title} (Id INTEGER NOT NULL UNIQUE, IsTaskDone INTEGER, Date TEXT NOT NULL UNIQUE" +
                                $", TimeOfCompletionUTC TEXT, TimeOfCompletionLocal TEXT, PRIMARY KEY(Id AUTOINCREMENT))");
     }
 }
Beispiel #2
0
 private async Task CreateTaskHolderRowAsync(TaskHolder taskHolder)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         await cnn.ExecuteAsync("INSERT INTO TaskHolder (DisplayTitle, Title, IsRepeat, WeeklyRepeatPattern," +
                                " TaskDuration, TimeTakeToMakeTask, Description, InitTime) VALUES (@DisplayTitle, @Title, @IsRepeat, @WeeklyRepeatPattern, @TaskDuration, @TimeTakeToMakeTask," +
                                " @Description, @InitTime)", taskHolder);
     }
 }
Beispiel #3
0
 public override async Task UpdateTaskHolderAsync(TaskHolder taskHolder)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
     {
         await cnn.ExecuteAsync(@"UPDATE TaskHolder 
             SET DisplayTitle = @DisplayTitle, IsRepeat = @IsRepeat, WeeklyRepeatPattern = @WeeklyRepeatPattern, TaskDuration = @TaskDuration, 
                 TimeTakeToMakeTask = @TimeTakeToMakeTask, Description = @Description 
             WHERE Title = @Title;"
                                , taskHolder);
     }
 }
Beispiel #4
0
 public override async Task CreateNewTaskHolderAsync(TaskHolder taskHolder)
 {
     await Task.WhenAll(new List <Task>() { CreateTaskHolderRowAsync(taskHolder), CreateBoolTypeUserTaskTableAsync(taskHolder) });
 }
 public abstract Task UpdateTaskHolderAsync(TaskHolder taskHolder);
 public abstract Task CreateNewTaskHolderAsync(TaskHolder taskHolder);