프로젝트

일반

사용자정보

개정판 37b10cc3

ID37b10cc3ecd7e8b221c2e141edb078dc90290cd2
상위 c62dde30
하위 2fb63a42

유성호이(가) 일년 이상 전에 추가함

issue #0000
공지사항 등록 개발
- DB생성
- model 생성
- repository 생성
- controller 생성
- main ui 수정(등록버튼, 이벤트 생성)

Change-Id: I01451e31f5973d4c0f21b501b7b087df8f1099dc

차이점 보기:

ID2.Manager/ID2.Manager.Controller/Controllers/FileController.cs
26 26
            }
27 27
        }
28 28

  
29
        public bool SetUserInfo(List<FileInfo> fileList)
29
        public bool SetFileInfo(List<FileInfo> fileList)
30 30
        {
31 31
            try
32 32
            {
ID2.Manager/ID2.Manager.Controller/ID2.Manager.Controller.csproj
60 60
    <Reference Include="System.Xml" />
61 61
  </ItemGroup>
62 62
  <ItemGroup>
63
    <Compile Include="Controllers\AttFileController.cs" />
63 64
    <Compile Include="Controllers\BaseController.cs" />
64 65
    <Compile Include="Controllers\DocumentController.cs" />
65 66
    <Compile Include="Controllers\ExcelDataController.cs" />
ID2.Manager/ID2.Manager.Dapper/ID2.Manager.Dapper.csproj
68 68
    <Compile Include="Entities\MEMBER.cs" />
69 69
    <Compile Include="IBaseRepository.cs" />
70 70
    <Compile Include="Properties\AssemblyInfo.cs" />
71
    <Compile Include="Repository\AttFileRepository.cs" />
71 72
    <Compile Include="Repository\BaseRepository.cs" />
72 73
    <Compile Include="Repository\DocumentRepository.cs" />
73 74
    <Compile Include="Repository\ExcelDataRepository.cs" />
ID2.Manager/ID2.Manager.Data/ID2.Manager.Data.csproj
61 61
    <Reference Include="System.Xml" />
62 62
  </ItemGroup>
63 63
  <ItemGroup>
64
    <Compile Include="Models\AttFileInfo.cs" />
64 65
    <Compile Include="Models\ExcelData.cs" />
65 66
    <Compile Include="Models\ExcelDataInfo.cs" />
66 67
    <Compile Include="Models\MarkupText.cs" />
ID2.Manager/ID2.Manager/Forms/ImageView.cs
119 119

  
120 120
            var files = new List<Data.Models.FileInfo>() { file };
121 121

  
122
            bool result = new FileController().SetUserInfo(files);
122
            bool result = new FileController().SetFileInfo(files);
123 123

  
124 124
            if (result)
125 125
            {
ID2.Manager/ID2.Manager/Main.Designer.cs
164 164
            this.radStatusStripMain = new Telerik.WinControls.UI.RadStatusStrip();
165 165
            this.radLabelElementSpace = new Telerik.WinControls.UI.RadLabelElement();
166 166
            this.radLabelElementUser = new Telerik.WinControls.UI.RadLabelElement();
167
            this.radButtonElementNoticeUpload = new Telerik.WinControls.UI.RadButtonElement();
167 168
            ((System.ComponentModel.ISupportInitialize)(this.ID2ManagerRadRibbonBar)).BeginInit();
168 169
            ((System.ComponentModel.ISupportInitialize)(this.radRibbonBarBackstageViewID2Manager)).BeginInit();
169 170
            this.radRibbonBarBackstageViewID2Manager.SuspendLayout();
......
324 325
            // radRibbonBarGroup1
325 326
            // 
326 327
            this.radRibbonBarGroup1.Items.AddRange(new Telerik.WinControls.RadItem[] {
327
            this.radButtonElementNotice});
328
            this.radButtonElementNotice,
329
            this.radButtonElementNoticeUpload});
328 330
            this.radRibbonBarGroup1.Name = "radRibbonBarGroup1";
329 331
            this.radRibbonBarGroup1.Text = "Inform";
330 332
            // 
......
451 453
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
452 454
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 85F));
453 455
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
454
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 82F));
456
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 86F));
455 457
            this.tableLayoutPanelCondition.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
456 458
            this.tableLayoutPanelCondition.Controls.Add(this.radDropDownListFrReviewStatus, 4, 1);
457 459
            this.tableLayoutPanelCondition.Controls.Add(this.radDropDownListToIsDiscussion, 2, 1);
......
496 498
            this.radDropDownListFrReviewStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
497 499
            this.radDropDownListFrReviewStatus.DropDownAnimationEnabled = true;
498 500
            this.radDropDownListFrReviewStatus.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
499
            this.radDropDownListFrReviewStatus.Location = new System.Drawing.Point(343, 32);
501
            this.radDropDownListFrReviewStatus.Location = new System.Drawing.Point(342, 32);
500 502
            this.radDropDownListFrReviewStatus.Name = "radDropDownListFrReviewStatus";
501
            this.radDropDownListFrReviewStatus.Size = new System.Drawing.Size(109, 20);
503
            this.radDropDownListFrReviewStatus.Size = new System.Drawing.Size(108, 20);
502 504
            this.radDropDownListFrReviewStatus.TabIndex = 18;
503 505
            // 
504 506
            // radDropDownListToIsDiscussion
......
508 510
            this.radDropDownListToIsDiscussion.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
509 511
            this.radDropDownListToIsDiscussion.Location = new System.Drawing.Point(141, 32);
510 512
            this.radDropDownListToIsDiscussion.Name = "radDropDownListToIsDiscussion";
511
            this.radDropDownListToIsDiscussion.Size = new System.Drawing.Size(109, 20);
513
            this.radDropDownListToIsDiscussion.Size = new System.Drawing.Size(108, 20);
512 514
            this.radDropDownListToIsDiscussion.TabIndex = 17;
513 515
            // 
514 516
            // radLabelFrReviewStatus
515 517
            // 
516 518
            this.radLabelFrReviewStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
517 519
            this.radLabelFrReviewStatus.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
518
            this.radLabelFrReviewStatus.Location = new System.Drawing.Point(257, 34);
520
            this.radLabelFrReviewStatus.Location = new System.Drawing.Point(256, 34);
519 521
            this.radLabelFrReviewStatus.Name = "radLabelFrReviewStatus";
520 522
            this.radLabelFrReviewStatus.Size = new System.Drawing.Size(59, 17);
521 523
            this.radLabelFrReviewStatus.TabIndex = 7;
......
545 547
            // 
546 548
            this.radLabelAVEVAStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
547 549
            this.radLabelAVEVAStatus.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
548
            this.radLabelAVEVAStatus.Location = new System.Drawing.Point(257, 62);
550
            this.radLabelAVEVAStatus.Location = new System.Drawing.Point(256, 62);
549 551
            this.radLabelAVEVAStatus.Name = "radLabelAVEVAStatus";
550 552
            this.radLabelAVEVAStatus.Size = new System.Drawing.Size(86, 17);
551 553
            this.radLabelAVEVAStatus.TabIndex = 8;
......
555 557
            // 
556 558
            this.radLabelIsID2Work.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
557 559
            this.radLabelIsID2Work.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
558
            this.radLabelIsID2Work.Location = new System.Drawing.Point(459, 34);
560
            this.radLabelIsID2Work.Location = new System.Drawing.Point(457, 34);
559 561
            this.radLabelIsID2Work.Name = "radLabelIsID2Work";
560 562
            this.radLabelIsID2Work.Size = new System.Drawing.Size(80, 17);
561 563
            this.radLabelIsID2Work.TabIndex = 6;
......
565 567
            // 
566 568
            this.radLabelJobLevel.Anchor = System.Windows.Forms.AnchorStyles.Left;
567 569
            this.radLabelJobLevel.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
568
            this.radLabelJobLevel.Location = new System.Drawing.Point(459, 6);
570
            this.radLabelJobLevel.Location = new System.Drawing.Point(457, 6);
569 571
            this.radLabelJobLevel.Name = "radLabelJobLevel";
570 572
            this.radLabelJobLevel.Size = new System.Drawing.Size(47, 17);
571 573
            this.radLabelJobLevel.TabIndex = 7;
......
616 618
            this.radButtonSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
617 619
            this.radButtonSearch.Cursor = System.Windows.Forms.Cursors.Hand;
618 620
            this.radButtonSearch.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
619
            this.radButtonSearch.Location = new System.Drawing.Point(875, 4);
621
            this.radButtonSearch.Location = new System.Drawing.Point(873, 4);
620 622
            this.radButtonSearch.Name = "radButtonSearch";
621 623
            this.tableLayoutPanelCondition.SetRowSpan(this.radButtonSearch, 4);
622 624
            this.radButtonSearch.Size = new System.Drawing.Size(54, 106);
......
630 632
            this.radDropDownListProject.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
631 633
            this.radDropDownListProject.Location = new System.Drawing.Point(141, 4);
632 634
            this.radDropDownListProject.Name = "radDropDownListProject";
633
            this.radDropDownListProject.Size = new System.Drawing.Size(109, 20);
635
            this.radDropDownListProject.Size = new System.Drawing.Size(108, 20);
634 636
            this.radDropDownListProject.TabIndex = 7;
635 637
            // 
636 638
            // radLabelDocumentNo
637 639
            // 
638 640
            this.radLabelDocumentNo.Anchor = System.Windows.Forms.AnchorStyles.Left;
639 641
            this.radLabelDocumentNo.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
640
            this.radLabelDocumentNo.Location = new System.Drawing.Point(661, 6);
642
            this.radLabelDocumentNo.Location = new System.Drawing.Point(658, 6);
641 643
            this.radLabelDocumentNo.Name = "radLabelDocumentNo";
642 644
            this.radLabelDocumentNo.Size = new System.Drawing.Size(49, 17);
643 645
            this.radLabelDocumentNo.TabIndex = 6;
......
646 648
            // radTextBoxDocumentNo
647 649
            // 
648 650
            this.radTextBoxDocumentNo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
649
            this.radTextBoxDocumentNo.Location = new System.Drawing.Point(747, 4);
651
            this.radTextBoxDocumentNo.Location = new System.Drawing.Point(744, 4);
650 652
            this.radTextBoxDocumentNo.Name = "radTextBoxDocumentNo";
651
            this.radTextBoxDocumentNo.Size = new System.Drawing.Size(109, 20);
653
            this.radTextBoxDocumentNo.Size = new System.Drawing.Size(108, 20);
652 654
            this.radTextBoxDocumentNo.TabIndex = 8;
653 655
            // 
654 656
            // radLabelPersonInCharge
655 657
            // 
656 658
            this.radLabelPersonInCharge.Anchor = System.Windows.Forms.AnchorStyles.Left;
657 659
            this.radLabelPersonInCharge.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
658
            this.radLabelPersonInCharge.Location = new System.Drawing.Point(257, 6);
660
            this.radLabelPersonInCharge.Location = new System.Drawing.Point(256, 6);
659 661
            this.radLabelPersonInCharge.Name = "radLabelPersonInCharge";
660 662
            this.radLabelPersonInCharge.Size = new System.Drawing.Size(47, 17);
661 663
            this.radLabelPersonInCharge.TabIndex = 6;
......
666 668
            this.radDropDownListPersonInCharge.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
667 669
            this.radDropDownListPersonInCharge.DropDownAnimationEnabled = true;
668 670
            this.radDropDownListPersonInCharge.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
669
            this.radDropDownListPersonInCharge.Location = new System.Drawing.Point(343, 4);
671
            this.radDropDownListPersonInCharge.Location = new System.Drawing.Point(342, 4);
670 672
            this.radDropDownListPersonInCharge.Name = "radDropDownListPersonInCharge";
671
            this.radDropDownListPersonInCharge.Size = new System.Drawing.Size(109, 20);
673
            this.radDropDownListPersonInCharge.Size = new System.Drawing.Size(108, 20);
672 674
            this.radDropDownListPersonInCharge.TabIndex = 9;
673 675
            // 
674 676
            // radLabel1
......
686 688
            this.radDropDownListJobLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
687 689
            this.radDropDownListJobLevel.DropDownAnimationEnabled = true;
688 690
            this.radDropDownListJobLevel.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
689
            this.radDropDownListJobLevel.Location = new System.Drawing.Point(545, 4);
691
            this.radDropDownListJobLevel.Location = new System.Drawing.Point(543, 4);
690 692
            this.radDropDownListJobLevel.Name = "radDropDownListJobLevel";
691
            this.radDropDownListJobLevel.Size = new System.Drawing.Size(109, 20);
693
            this.radDropDownListJobLevel.Size = new System.Drawing.Size(108, 20);
692 694
            this.radDropDownListJobLevel.TabIndex = 11;
693 695
            // 
694 696
            // radLabelID2Status
......
705 707
            // 
706 708
            this.radLabel10.Anchor = System.Windows.Forms.AnchorStyles.Left;
707 709
            this.radLabel10.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
708
            this.radLabel10.Location = new System.Drawing.Point(257, 90);
710
            this.radLabel10.Location = new System.Drawing.Point(256, 90);
709 711
            this.radLabel10.Name = "radLabel10";
710 712
            this.radLabel10.Size = new System.Drawing.Size(61, 17);
711 713
            this.radLabel10.TabIndex = 9;
......
716 718
            this.radDropDownListIsID2Work.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
717 719
            this.radDropDownListIsID2Work.DropDownAnimationEnabled = true;
718 720
            this.radDropDownListIsID2Work.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
719
            this.radDropDownListIsID2Work.Location = new System.Drawing.Point(545, 32);
721
            this.radDropDownListIsID2Work.Location = new System.Drawing.Point(543, 32);
720 722
            this.radDropDownListIsID2Work.Name = "radDropDownListIsID2Work";
721
            this.radDropDownListIsID2Work.Size = new System.Drawing.Size(109, 20);
723
            this.radDropDownListIsID2Work.Size = new System.Drawing.Size(108, 20);
722 724
            this.radDropDownListIsID2Work.TabIndex = 12;
723 725
            // 
724 726
            // radDropDownListID2Status
......
728 730
            this.radDropDownListID2Status.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
729 731
            this.radDropDownListID2Status.Location = new System.Drawing.Point(141, 60);
730 732
            this.radDropDownListID2Status.Name = "radDropDownListID2Status";
731
            this.radDropDownListID2Status.Size = new System.Drawing.Size(109, 20);
733
            this.radDropDownListID2Status.Size = new System.Drawing.Size(108, 20);
732 734
            this.radDropDownListID2Status.TabIndex = 13;
733 735
            // 
734 736
            // radDropDownListAVEVAStatus
......
736 738
            this.radDropDownListAVEVAStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
737 739
            this.radDropDownListAVEVAStatus.DropDownAnimationEnabled = true;
738 740
            this.radDropDownListAVEVAStatus.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
739
            this.radDropDownListAVEVAStatus.Location = new System.Drawing.Point(343, 60);
741
            this.radDropDownListAVEVAStatus.Location = new System.Drawing.Point(342, 60);
740 742
            this.radDropDownListAVEVAStatus.Name = "radDropDownListAVEVAStatus";
741
            this.radDropDownListAVEVAStatus.Size = new System.Drawing.Size(109, 20);
743
            this.radDropDownListAVEVAStatus.Size = new System.Drawing.Size(108, 20);
742 744
            this.radDropDownListAVEVAStatus.TabIndex = 14;
743 745
            // 
744 746
            // radDropDownListProdIsResult
......
748 750
            this.radDropDownListProdIsResult.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
749 751
            this.radDropDownListProdIsResult.Location = new System.Drawing.Point(141, 89);
750 752
            this.radDropDownListProdIsResult.Name = "radDropDownListProdIsResult";
751
            this.radDropDownListProdIsResult.Size = new System.Drawing.Size(109, 20);
753
            this.radDropDownListProdIsResult.Size = new System.Drawing.Size(108, 20);
752 754
            this.radDropDownListProdIsResult.TabIndex = 15;
753 755
            // 
754 756
            // radDropDownListClientIsResult
......
756 758
            this.radDropDownListClientIsResult.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
757 759
            this.radDropDownListClientIsResult.DropDownAnimationEnabled = true;
758 760
            this.radDropDownListClientIsResult.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
759
            this.radDropDownListClientIsResult.Location = new System.Drawing.Point(343, 89);
761
            this.radDropDownListClientIsResult.Location = new System.Drawing.Point(342, 89);
760 762
            this.radDropDownListClientIsResult.Name = "radDropDownListClientIsResult";
761
            this.radDropDownListClientIsResult.Size = new System.Drawing.Size(109, 20);
763
            this.radDropDownListClientIsResult.Size = new System.Drawing.Size(108, 20);
762 764
            this.radDropDownListClientIsResult.TabIndex = 16;
763 765
            // 
764 766
            // tableLayoutPanelGroup
......
1543 1545
            this.radLabelElementUser.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
1544 1546
            this.radLabelElementUser.TextWrap = true;
1545 1547
            // 
1548
            // radButtonElementNoticeUpload
1549
            // 
1550
            this.radButtonElementNoticeUpload.Name = "radButtonElementNoticeUpload";
1551
            this.radButtonElementNoticeUpload.Text = "Upload";
1552
            // 
1546 1553
            // Main
1547 1554
            // 
1548 1555
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
......
1716 1723
        private Telerik.WinControls.UI.RadButtonElement radButtonElementSync;
1717 1724
        private Telerik.WinControls.UI.RadRibbonBarGroup radRibbonBarGroup1;
1718 1725
        private Telerik.WinControls.UI.RadButtonElement radButtonElementNotice;
1726
        private Telerik.WinControls.UI.RadButtonElement radButtonElementNoticeUpload;
1719 1727
    }
1720 1728
}
ID2.Manager/ID2.Manager/Main.cs
56 56
            this.radButtonElementSave.Click += RadButtonElementSave_Click;
57 57
            this.radButtonElementSync.Click += RadButtonElementSync_Click;
58 58
            this.radButtonElementNotice.Click += RadButtonElementNotice_Click;
59
            this.radButtonElementNoticeUpload.Click += RadButtonElementNoticeUpload_Click;
59 60
            this.radButtonElementExcelImport.Click += RadButtonElementExcelImport_Click;
60 61
            this.radButtonElementExcelExport.Click += RadButtonElementExcelExport_Click;
61 62

  
......
1480 1481
            RadMessageBox.Show("공지사항 click!!", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info);
1481 1482
        }
1482 1483

  
1484
        private void RadButtonElementNoticeUpload_Click(object sender, EventArgs e)
1485
        {
1486
            string GetContentType(string filePath)
1487
            {
1488
                string extension = Path.GetExtension(filePath).ToLower();
1489

  
1490
                switch (extension)
1491
                {
1492
                    case ".txt":
1493
                        return "text/plain";
1494
                    case ".pdf":
1495
                        return "application/pdf";
1496
                    case ".jpg":
1497
                    case ".jpeg":
1498
                        return "image/jpeg";
1499
                    case ".png":
1500
                        return "image/png";
1501
                    default:
1502
                        return "application/octet-stream";
1503
                }
1504
            }
1505

  
1506
            using (OpenFileDialog ofd = new OpenFileDialog()
1507
            {
1508
                Filter = "PDF files (*.pdf)|*.pdf|All files (*.*)|*.*",
1509
                //Title = "Open an Excel File",
1510
                RestoreDirectory = true
1511
            })
1512
            {
1513
                try
1514
                {
1515
                    if (ofd.ShowDialog() == DialogResult.OK)
1516
                    {
1517
                        System.IO.FileInfo fileInfo = new System.IO.FileInfo(ofd.FileName);
1518
                        if (fileInfo.Exists)
1519
                        {
1520
                            AttFileInfo attFile = new AttFileInfo()
1521
                            {
1522
                                RefID = informations.ActiveProject.ProjectID,
1523
                                Category = "notice",
1524
                                FileType = GetContentType(fileInfo.FullName),
1525
                                FileName = fileInfo.Name,
1526
                                FilePath = fileInfo.DirectoryName
1527
                            };
1528

  
1529
                            using (var stream = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read))
1530
                            {
1531
                                using (var reader = new BinaryReader(stream))
1532
                                {
1533
                                    attFile.FileData = reader.ReadBytes((int)stream.Length);
1534
                                }
1535
                            }
1536

  
1537
                            bool result = new AttFileController().SetAttFiles(new List<AttFileInfo>() { attFile }, informations.ActiveUser.ID);
1538

  
1539
                            if (result)
1540
                            {
1541
                                RadMessageBox.Show("An Notice has been posted.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info);
1542
                            }
1543
                        }
1544
                    }
1545
                }
1546
                catch (Exception ex)
1547
                {
1548
                    Program.logger.Error($"An exception occurred from {MethodBase.GetCurrentMethod().Name}", ex);
1549
                    RadMessageBox.Show("Failed to register the Notice.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Error);
1550
                }
1551
            }
1552
        }
1553

  
1483 1554
        private void RadButtonElementRefreshCommand_Click(object sender, EventArgs e)
1484 1555
        {
1485 1556
            bool isReload = false;

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)