public string UpdateText(INoteCore note, string text) { var dummyNote = backend.GetNoteBy(note.Id); dummyNote.Text = text; return(text); }
void UpdateNote(INoteCore note, string title, string text) { var rtmNote = backend.Rtm.NotesEdit(backend.Timeline, note.Id, note.Title, note.Text); note.Title = rtmNote.Title; note.Text = rtmNote.Text; }
void INoteCollectionRepo.AddNew(ITaskCore task, INoteCore note) { var dummyTask = backend.GetTaskBy(task.Id); var dummyNote = new DummyNote(note.Text); dummyTask.TaskNotes.Add(dummyNote); }
void INoteCollectionRepo.Remove(ITaskCore container, INoteCore item) { string taskSeriesId, taskId; backend.DecodeTaskId(container, out taskSeriesId, out taskId); backend.Rtm.NotesDelete(backend.Timeline, item.Id); }
void INoteCollectionRepo.Remove(ITaskCore task, INoteCore note) { var dummyTask = backend.GetTaskBy(task.Id); var dummyNote = dummyTask.TaskNotes.Single( n => n.Id.ToString() == note.Id); dummyTask.TaskNotes.Remove(dummyNote); }
void NoteCollectionRepo.Remove(ITaskCore container, INoteCore item) { var command = "DELETE FROM Notes WHERE ID=@id;"; using (var cmd = new SqliteCommand(database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddIdParameter(item); cmd.ExecuteNonQuery(); } }
string INoteRepository.UpdateTitle(INoteCore note, string title) { var command = "UPDATE Notes SET Name=@name WHERE ID=@id"; using (var cmd = new SqliteCommand (database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddWithValue ("@name", title); cmd.Parameters.AddIdParameter (note); cmd.ExecuteNonQuery (); } return title; }
string INoteRepository.UpdateText(INoteCore note, string text) { var command = "UPDATE Notes SET Text=@text WHERE ID=@id"; using (var cmd = new SqliteCommand (database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddWithValue ("@text", text); cmd.Parameters.AddIdParameter (note); cmd.ExecuteNonQuery (); } return text; }
string INoteRepository.UpdateText(INoteCore note, string text) { var command = "UPDATE Notes SET Text=@text WHERE ID=@id"; using (var cmd = new SqliteCommand(database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddWithValue("@text", text); cmd.Parameters.AddIdParameter(note); cmd.ExecuteNonQuery(); } return(text); }
void INoteCollectionRepo.AddNew(ITaskCore container, INoteCore item) { var taskList = container.TaskListContainers.First(); string taskSeriesId, taskId; backend.DecodeTaskId(container, out taskSeriesId, out taskId); var note = backend.Rtm.NotesAdd(backend.Timeline, taskList.Id, taskSeriesId, taskId, item.Title, item.Text); item.Text = note.Text; item.Title = note.Title; item.SetId(note.ID); }
void NoteCollectionRepo.AddNew(ITaskCore container, INoteCore item) { var command = "INSERT INTO Notes (Name, Text, Task)" + "VALUES (@name, @text, @id); SELECT last_insert_rowid();"; using (var cmd = new SqliteCommand(database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddWithValue("@name", item.Title); cmd.Parameters.AddWithValue("@text", item.Text); cmd.Parameters.AddIdParameter(container); var id = cmd.ExecuteScalar().ToString(); item.SetId(id); } }
void INoteCollectionRepo.Add(ITaskCore task, INoteCore note) { throw new NotSupportedException ( "Notes can only belong to one task."); }
void NoteCollectionRepo.Remove(ITaskCore container, INoteCore item) { var command = "DELETE FROM Notes WHERE ID=@id;"; using (var cmd = new SqliteCommand (database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddIdParameter (item); cmd.ExecuteNonQuery (); } }
void NoteCollectionRepo.AddNew(ITaskCore container, INoteCore item) { var command = "INSERT INTO Notes (Name, Text, Task)" + "VALUES (@name, @text, @id); SELECT last_insert_rowid();"; using (var cmd = new SqliteCommand (database.Connection)) { cmd.CommandText = command; cmd.Parameters.AddWithValue ("@name", item.Title); cmd.Parameters.AddWithValue ("@text", item.Text); cmd.Parameters.AddIdParameter (container); var id = cmd.ExecuteScalar ().ToString (); item.SetId (id); } }
void NoteCollectionRepo.Add(ITaskCore container, INoteCore item) { throw new NotSupportedException ( "A note can only belong to a single task."); }
public string UpdateTitle(INoteCore note, string title) { return null; }
public string UpdateText(INoteCore note, string text) { var dummyNote = backend.GetNoteBy (note.Id); dummyNote.Text = text; return text; }
string INoteRepository.UpdateText(INoteCore note, string text) { UpdateNote(note, note.Title, text); return(note.Text); }
void INoteCollectionRepo.AddNew(ITaskCore container, INoteCore item) { var taskList = container.TaskListContainers.First (); string taskSeriesId, taskId; backend.DecodeTaskId (container, out taskSeriesId, out taskId); var note = backend.Rtm.NotesAdd (backend.Timeline, taskList.Id, taskSeriesId, taskId, item.Title, item.Text); item.Text = note.Text; item.Title = note.Title; item.SetId (note.ID); }
void NoteCollectionRepo.Add(ITaskCore container, INoteCore item) { throw new NotSupportedException( "A note can only belong to a single task."); }
public string UpdateTitle(INoteCore note, string title) { UpdateNote (note, title, note.Text); return note.Title; }
public INoteCore UpdateNote(ITaskCore task, INoteCore note) { throw new NotSupportedException ( "This backend supports multiple notes."); }
void INoteCollectionRepo.Remove(ITaskCore container, INoteCore item) { string taskSeriesId, taskId; backend.DecodeTaskId (container, out taskSeriesId, out taskId); backend.Rtm.NotesDelete (backend.Timeline, item.Id); }
void INoteCollectionRepo.AddNew(ITaskCore task, INoteCore note) { var dummyTask = backend.GetTaskBy (task.Id); var dummyNote = new DummyNote (note.Text); dummyTask.TaskNotes.Add (dummyNote); }
void INoteCollectionRepo.Add(ITaskCore task, INoteCore note) { throw new NotSupportedException( "Notes can only belong to one task."); }
void INoteCollectionRepo.Remove(ITaskCore task, INoteCore note) { var dummyTask = backend.GetTaskBy (task.Id); var dummyNote = dummyTask.TaskNotes.Single ( n => n.Id.ToString () == note.Id); dummyTask.TaskNotes.Remove (dummyNote); }
public string UpdateTitle(INoteCore note, string title) { UpdateNote(note, title, note.Text); return(note.Title); }
string INoteRepository.UpdateText(INoteCore note, string text) { UpdateNote (note, note.Title, text); return note.Text; }
INoteCore ITaskRepository.UpdateNote(ITaskCore task, INoteCore note) { throw new NotSupportedException( "This backend supports multiple notes."); }
void UpdateNote(INoteCore note, string title, string text) { var rtmNote = backend.Rtm.NotesEdit (backend.Timeline, note.Id, note.Title, note.Text); note.Title = rtmNote.Title; note.Text = rtmNote.Text; }
public string UpdateTitle(INoteCore note, string title) { return(null); }