private async Task SearchData() { var resultsSet = await NoticeRepositoryAsyncReference.SearchAllAsync(pager.PageIndex, pager.PageSize, this.searchQuery); pager.RecordCount = resultsSet.TotalRecords; models = resultsSet.Records.ToList(); }
protected override async Task OnInitializedAsync() { model = await NoticeRepositoryAsyncReference.GetByIdAsync(Id); content = Dul.HtmlUtility.EncodeWithTabAndSpace(model.Content); ParentId = model.ParentId.ToString(); }
private async Task DisplayData() { //await Task.Delay(3000); var resultsSet = await NoticeRepositoryAsyncReference.GetAllAsync(pager.PageIndex, pager.PageSize); pager.RecordCount = resultsSet.TotalRecords; models = resultsSet.Records.ToList(); }
protected async void DeleteClick() { await NoticeRepositoryAsyncReference.DeleteAsync(this.model.Id); DeleteDialogReference.Hide(); this.model = new BoardNotices(); await DisplayData(); }
protected async void FormSubmit() { int.TryParse(ParentId, out int parentId); model.ParentId = parentId; await NoticeRepositoryAsyncReference.EditAsync(model); NavigationManagerReference.NavigateTo("/Boards/Notices"); }
private async Task DisplayData() { //await Task.Delay(3000); // 프로세스바 테스트용 var resultSet = await NoticeRepositoryAsyncReference.GetAllAsync(pager.PageIndex, pager.PageSize); //데이터 추울력 pager.RecordCount = resultSet.TotalRecords; //카운트 models = resultSet.Records.ToList(); //전체레코드 출력 }
protected async void ToggleClick() { this.model.IsPinned = (this.model?.IsPinned == true) ? false : true; await NoticeRepositoryAsyncReference.EditAsync(this.model); IsInlineDialogShow = false; this.model = new BoardNotices(); await DisplayData(); }
protected async void FormSubmit() { int.TryParse(ParentId, out int parentId); model.ParentId = parentId; await NoticeRepositoryAsyncReference.AddAsync(model); //Socketlabs.SendMessage(model.Title, model.Content, ""); // 전체메일 발송 NavigationManagerReference.NavigateTo("/Boards/Notices"); }
protected async void DeleteClick() { // 첨부파일 삭제 await FileStorageManager.DeleteAsync(model.FileName, ""); await NoticeRepositoryAsyncReference.DeleteAsync(this.model.Id); DeleteDialogReference.Hide(); this.model = new BoardNotices(); await DisplayData(); }
private async Task DisplayData() { VisibleProperty = true; var resultSet = await NoticeRepositoryAsyncReference.GetAllAsync(pager.PageIndex, pager.PageSize); pager.RecordCount = resultSet.TotalRecords; if (resultSet.Records != null) { models = resultSet.Records.ToList(); } VisibleProperty = false; }
protected async void DeleteClick() { bool isDelete = await JSRuntime.InvokeAsync<bool>("confirm", $"{Id}번 글을 정말로 삭제하시겠습니까?"); if (isDelete) { await NoticeRepositoryAsyncReference.DeleteAsync(Id); // 삭제 NavigationManagerReference.NavigateTo("/Notices"); // 리스트 페이지로 이동 } else { await JSRuntime.InvokeAsync<object>("alert", "취소되었습니다."); } }
private async Task SearchData() { if (ParentId == 0) { var resultSet = await NoticeRepositoryAsyncReference.SearchAllAsync(pager.PageIndex, pager.PageSize, this.searchQuery); pager.RecordCount = resultSet.TotalRecords; models = resultSet.Records.ToList(); StateHasChanged(); } else { var resultSet = await NoticeRepositoryAsyncReference.SearchAllByParentIdAsync(pager.PageIndex, pager.PageSize, this.searchQuery, ParentId); pager.RecordCount = resultSet.TotalRecords; models = resultSet.Records.ToList(); StateHasChanged(); } }
private async Task DisplayData() { if (ParentId == 0) { //await Task.Delay(3000); var resultSet = await NoticeRepositoryAsyncReference.GetAllAsync(pager.PageIndex, pager.PageSize); pager.RecordCount = resultSet.TotalRecords; models = resultSet.Records.ToList(); StateHasChanged(); } else { var resultSet = await NoticeRepositoryAsyncReference.GetAllByParentIdAsync(pager.PageIndex, pager.PageSize, ParentId); pager.RecordCount = resultSet.TotalRecords; models = resultSet.Records.ToList(); StateHasChanged(); } }
protected async void FormSubmit() { await NoticeRepositoryAsyncReference.AddAsync(model); NavigationManagerReference.NavigateTo("/Notices"); }