private void ConfirmDelete() { _notesService.Delete(selected.Note); HideConfirmDeletePrompt(); Selected = null; }
async void DeleteNoteFromStorage() { IsBusy = true; await _notesService.Delete(_currentNoteItem); IsBusy = false; _navigationService.GoBack(); }
public IHttpActionResult Delete(Guid noteId) { if (_notesService.Delete(noteId, User.GetTokenData())) { return(Ok()); } return(BadRequest()); }
public ActionResult DeleteNote(int noteId) { if (_dataService.Delete(noteId)) { return(NoContent()); } return(NotFound()); }
private async Task RemoveNote(NoteViewItem noteViewItem) { IsBusy = true; Notes.Remove(noteViewItem); await _notesService.Delete(noteViewItem.NoteItem); IsBusy = false; }
public IActionResult Delete(int id) { var deleted = service.Delete(id); if (!deleted) { return(NotFound()); } return(NoContent()); }
public IActionResult Delete(int noteId) { var note = _notesService.GetNoteById(noteId); if (note.DepartmentId != DepartmentId) { Unauthorized(); } _notesService.Delete(note); return(RedirectToAction("Index", "Notes", new { Area = "User" })); }
public async Task <ApiResponse> Delete(Guid id) { try { var result = await _objControllerHelper.Delete(id); if (result.Status == NotesUpdateStatus.Success) { return(new ApiResponse(result)); } return(new ApiResponse(400, result.Error.Message)); } catch (Exception ex) { throw new ApiException(ex); } }
public async Task <IActionResult> Delete(int id) { await _notesService.Delete(id); return(NoContent()); }
public ActionResult <bool> Delete(Guid id) { return(_notesService.Delete(id)); }
public void Delete() { _notesService.Delete(_note); }