private void _notesSelectorComponent_EntitySelectionDoubleClick(object sender, ComponentEventArgs <NoteInfoDto> e) { if (e.Entity == null) { return; } _selectedNoteInfo = e.Entity; EditNote(); }
public async Task <Result <NoteExtendedDto> > NewExtendedAsync(NoteInfoDto entityInfo = null) { var result = new Result <NoteExtendedDto>(); var entity = (await _repository.Notes.NewAsync(entityInfo)).Entity.GetSimpleDto <NoteExtendedDto>(); result.Entity = entity; return(result); }
private void OnNoteEditorDeleted(NoteInfoDto noteInfo) { NotesSelectorComponent.DeleteItem(noteInfo); if (NotesSelectorComponent.ListEntities?.Count == 0) { NoteEditorComponent.View.CleanView(); _selectedNoteInfo = null; } }
private async void _notesSelectorComponent_EntitySelection(object sender, ComponentEventArgs <NoteInfoDto> e) { if (e.Entity == null || SelectedServiceRef == null) { return; } NotifyMessage($"Loading note details for note {e.Entity.NoteNumber}"); _selectedNoteInfo = e.Entity; await NoteEditorComponent.LoadModelById(SelectedServiceRef.Service, _selectedNoteInfo.NoteId); NotifyMessage($"Loaded note details for note {e.Entity.NoteNumber}"); }
private async void OnNoteEditorSaved(NoteInfoDto noteInfo) { if (NoteEditorComponent.Model.NoteId == noteInfo.NoteId) { await NoteEditorComponent.LoadModelById(SelectedServiceRef.Service, noteInfo.NoteId); } NotesSelectorComponent.RefreshItem(noteInfo); if (NotesSelectorComponent.ListEntities?.Count == 0) { NoteEditorComponent.View.CleanView(); _selectedNoteInfo = null; } }
private async void OnNoteEditorAdded(NoteInfoDto noteInfo) { if (NotesSelectorComponent.ListEntities == null) { return; } if (NotesSelectorComponent.ListEntities.Count == 0) { await NoteEditorComponent.LoadModelById(SelectedServiceRef.Service, noteInfo.NoteId); _selectedNoteInfo = noteInfo; } NotesSelectorComponent.AddItem(noteInfo); }
private async void RefreshActiveFilterWithServiceRef(NotesFilterWithServiceRef notesFilterWithServiceRef) { SelectMode = EnumSelectMode.Filters; NotifyMessage($"Loading notes filter: {notesFilterWithServiceRef?.NotesFilter?.TextSearch}"); FolderPath = $"Notes filter: {notesFilterWithServiceRef?.NotesFilter?.TextSearch}"; _selectedNoteInfo = null; NoteEditorComponent.View.CleanView(); await NotesSelectorComponent.LoadFilteredEntities(notesFilterWithServiceRef?.ServiceRef?.Service, notesFilterWithServiceRef?.NotesFilter); CountNotes = NotesSelectorComponent.ListEntities?.Count; View.ShowInfo(null); NotifyMessage($"Loaded notes filter {notesFilterWithServiceRef?.NotesFilter?.TextSearch}"); }
private async void RefreshActiveFolderWithServiceRef(FolderWithServiceRef folderWithServideRef) { if (folderWithServideRef == null) { return; } SelectMode = EnumSelectMode.Folders; NotifyMessage($"Loading notes list for folder {folderWithServideRef.FolderInfo?.FolderNumber}"); FolderPath = FoldersSelectorComponent.Path; _selectedNoteInfo = null; NoteEditorComponent.CleanView(); await NotesSelectorComponent.LoadEntities(folderWithServideRef.ServiceRef.Service, folderWithServideRef.FolderInfo); CountNotes = NotesSelectorComponent.ListEntities?.Count; View.ShowInfo(null); NotifyMessage($"Loaded notes list for folder {folderWithServideRef.FolderInfo?.FolderNumber}"); }
public async Task <Result <NoteDto> > NewAsync(NoteInfoDto entity = null) { return(await _httpClient.GetFromJsonAsync <Result <NoteDto> >($"api/notes/new")); }
public async Task <Result <NoteDto> > NewAsync(NoteInfoDto entityInfo = null) { return(await _repository.Notes.NewAsync(entityInfo)); }