예제 #1
0
            public async Task GetNotesAsync()
            {
                CollectNotes.Clear();
                NoteSearchResult NoteSearchResult = await DataNoteRepository.GetRecords(SearchCondition);

                if (NoteSearchResult == null)
                {
                    return;
                }

                SearchCondition.RecordCount = NoteSearchResult.SearchCondition.RecordCount;

                NoteSearchResult.RecordList?.ToList().ForEach(e =>
                {
                    CollectNotes.Add(e);
                });
                if (SearchCondition.PageCount > 1)
                {
                    CanVisible = "Visible";
                }
                else
                {
                    CanVisible = "Collapsed";
                }
            }
예제 #2
0
            public async Task <ExcuteResult> DelNode()
            {
                ExcuteResult excuteResult = new ExcuteResult();

                if (CurNote != null)
                {
                    excuteResult = await DataNoteRepository.DeleteRecord(CurNote.Id);

                    if (excuteResult.State == 0)
                    {
                        CollectNotes.Remove(CurNote);
                    }
                }
                return(excuteResult);
            }
예제 #3
0
            public async Task <ExcuteResult> SaveNode()
            {
                ExcuteResult excuteResult;

                if (CurNote.Id == null)
                {
                    excuteResult = await DataNoteRepository.AddRecord(CurNote);

                    if (excuteResult.State == 0)
                    {
                        CurNote.Id = excuteResult.Tag;
                        CollectNotes.Add(CurNote);
                    }
                }
                else
                {
                    excuteResult = await DataNoteRepository.UpdateRecord(CurNote);
                }
                return(excuteResult);
            }