private void ConfirmDelete()
        {
            _notesService.Delete(selected.Note);

            HideConfirmDeletePrompt();
            Selected = null;
        }
예제 #2
0
        async void DeleteNoteFromStorage()
        {
            IsBusy = true;
            await _notesService.Delete(_currentNoteItem);

            IsBusy = false;
            _navigationService.GoBack();
        }
예제 #3
0
 public IHttpActionResult Delete(Guid noteId)
 {
     if (_notesService.Delete(noteId, User.GetTokenData()))
     {
         return(Ok());
     }
     return(BadRequest());
 }
예제 #4
0
 public ActionResult DeleteNote(int noteId)
 {
     if (_dataService.Delete(noteId))
     {
         return(NoContent());
     }
     return(NotFound());
 }
예제 #5
0
        private async Task RemoveNote(NoteViewItem noteViewItem)
        {
            IsBusy = true;
            Notes.Remove(noteViewItem);
            await _notesService.Delete(noteViewItem.NoteItem);

            IsBusy = false;
        }
예제 #6
0
        public IActionResult Delete(int id)
        {
            var deleted = service.Delete(id);

            if (!deleted)
            {
                return(NotFound());
            }
            return(NoContent());
        }
예제 #7
0
        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" }));
        }
예제 #8
0
        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);
            }
        }
예제 #9
0
        public async Task <IActionResult> Delete(int id)
        {
            await _notesService.Delete(id);

            return(NoContent());
        }
예제 #10
0
 public ActionResult <bool> Delete(Guid id)
 {
     return(_notesService.Delete(id));
 }
예제 #11
0
 public void Delete()
 {
     _notesService.Delete(_note);
 }