Beispiel #1
0
        protected async void FormSubmit()
        {
            int.TryParse(ParentId, out int parentId);
            model.ParentId = parentId;

            #region  일 업로드 관련 추가 코드 영역
            if (selectedFiles != null && selectedFiles.Length > 0)
            {
                // 파일 업로드
                var file     = selectedFiles.FirstOrDefault();
                var fileName = "";
                int fileSize = 0;
                if (file != null)
                {
                    fileName = file.Name;
                    fileSize = Convert.ToInt32(file.Size);

                    // 첨부 파일 삭제
                    await FileStorageManager.DeleteAsync(model.FileName, "");

                    // 다시 업로드
                    fileName = await FileStorageManager.UploadAsync(file.Data, file.Name, "", true);

                    model.FileName = fileName;
                    model.FileSize = fileSize;
                }
            }
            #endregion

            await UploadRepositoryAsyncReference.EditAsync(model);

            NavigationManagerReference.NavigateTo("/Uploads");
        }
Beispiel #2
0
        protected async void FormSubmit()
        {
            int.TryParse(ParentId, out int parentId);
            model.ParentId = parentId;

            #region  일 업로드 관련 추가 코드 영역
            if (selectedFiles != null && selectedFiles.Length > 0)
            {
                // 파일 업로드
                var file     = selectedFiles.FirstOrDefault();
                var fileName = "";
                int fileSize = 0;
                if (file != null)
                {
                    fileName = file.Name;
                    fileSize = Convert.ToInt32(file.Size);

                    fileName = await FileStorageManager.UploadAsync(file.Data, file.Name, "", true);

                    model.FileName = fileName;
                    model.FileSize = fileSize;
                }
            }
            #endregion

            foreach (var m in Models)
            {
                m.FileName = model.FileName;
                m.FileSize = model.FileSize;
                await UploadRepositoryAsyncReference.AddAsync(m);
            }

            NavigationManagerReference.NavigateTo("/BriefingLogs");
        }
Beispiel #3
0
        protected async void FormSubmit()
        {
            int.TryParse(ParentId, out int parentId);
            model.ParentId = parentId;
            await NoticeRepositoryAsyncReference.EditAsync(model);

            NavigationManagerReference.NavigateTo("/Boards/Notices");
        }
Beispiel #4
0
        protected async void FormSubmit()
        {
            int.TryParse(ParentId, out int parentId);
            model.ParentId = parentId;
            await UploadRepositoryAsyncReference.AddAsync(model);

            NavigationManagerReference.NavigateTo("/Boards/Uploads");
        }
Beispiel #5
0
        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");
        }
Beispiel #6
0
        protected async void DeleteClick()
        {
            bool isDelete = await JSRuntime.InvokeAsync <bool>("confirm", $"{Id}번 글을 정말로 삭제하시겠습니까?");

            if (isDelete)
            {
                await UploadRepositoryAsyncReference.DeleteAsync(Id);

                NavigationManagerReference.NavigateTo("/Boards/Uploads");
            }
            else
            {
                await JSRuntime.InvokeAsync <object>("alarm", "취소되었습니다.");
            }
        }
Beispiel #7
0
 protected void NameClick(int id)
 {
     NavigationManagerReference.NavigateTo($"/Boards/Notices/Details/{id}");
 }
Beispiel #8
0
        protected async void FormSubmit()
        {
            await NoticeRepositoryAsyncReference.AddAsync(model);

            NavigationManagerReference.NavigateTo("/Notices");
        }
Beispiel #9
0
 protected void NameClick(int id)
 {
     NavigationManagerReference.NavigateTo($"/Libraries/Details/{id}");
 }
Beispiel #10
0
 protected void NameClick(int id)
 {
     NavigationManagerReference.NavigateTo($"/BriefingLogs/Details/{id}");
 }