protected override async Task OnInitializedAsync() { model = await UploadRepositoryAsyncReference.GetByIdAsync(Id); content = Dul.HtmlUtility.EncodeWithTabAndSpace(model.Content); ParentId = model.ParentId.ToString(); }
protected void ShowEditorForm() { EditorFormTitle = "CREATE"; this.model = new BriefingLog(); this.model.ParentKey = ParentKey; // EditorFormReference.Show(); }
protected void EditBy(BriefingLog model) { EditorFormTitle = "EDIT"; this.model = new BriefingLog(); this.model = model; this.model.ParentKey = ParentKey; // EditorFormReference.Show(); }
protected async void ToggleClick() { this.model.IsPinned = (this.model?.IsPinned == true) ? false : true; await UploadRepositoryAsyncReference.EditAsync(this.model); IsInlineDialogShow = false; this.model = new BriefingLog(); await DisplayData(); }
protected async void DeleteClick() { if (!string.IsNullOrEmpty(model?.FileName)) { // 첨부 파일 삭제 await FileStorageManager.DeleteAsync(model.FileName, ""); } await UploadRepositoryAsyncReference.DeleteAsync(this.model.Id); DeleteDialogReference.Hide(); this.model = new BriefingLog(); await DisplayData(); }
protected async void DownloadBy(BriefingLog model) { if (!string.IsNullOrEmpty(model.FileName)) { byte[] fileBytes = await FileStorageManager.DownloadAsync(model.FileName, ""); if (fileBytes != null) { // DownCount model.DownCount = model.DownCount + 1; await UploadRepositoryAsyncReference.EditAsync(model); await FileUtil.SaveAs(JSRuntime, model.FileName, fileBytes); } } }
protected void ToggleClose() { IsInlineDialogShow = false; this.model = new BriefingLog(); }
protected async void CreateOrEdit() { EditorFormReference.Hide(); this.model = new BriefingLog(); await DisplayData(); }
protected void ToggleBy(BriefingLog model) { this.model = model; IsInlineDialogShow = true; }
protected void DeleteBy(BriefingLog model) { this.model = model; DeleteDialogReference.Show(); }