프로젝트

일반

사용자정보

개정판 3b7f9db8

ID3b7f9db8496756a70cb1033e01fe71becf6ab104
상위 3295dabe
하위 6ad9d92b

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

issue #0000
삼성 유저 - 삼성 관련 필드는 삼성 사용자만 편집 가능하도록
도프텍 유저 - 삼성 관련 필드 제외 편집 가능하도록 수정

Change-Id: I90909874fc786d60d24c7623ef77b73189d12f28

차이점 보기:

ID2.Manager/ID2.Manager/Controls/BriefAndImages.cs
12 12
using Telerik.WinControls;
13 13
using Telerik.WinControls.UI;
14 14

  
15
using ID2.Manager.Common;
16

  
15 17
namespace ID2.Manager.Controls
16 18
{
17 19

  
18 20
    public partial class BriefAndImages : UserControl
19 21
    {
22
        readonly Informations informations = Informations.Instance;
20 23
        const int TextMinHeight = 30;
21 24
        public event EventHandler<AttImageInfo> RemoveImage;
25
        bool IsClient = false;
22 26

  
23 27
        public BriefAndImages()
24 28
        {
......
39 43
            selectImage.MouseWheel += SelectImage_MouseWheel;
40 44

  
41 45
            lstToImages.SelectedItemChanged += LstImages_SelectedItemChanged;
46
            lstToImages.ItemRemoving += LstToImages_ItemRemoving;
42 47
            lstToImages.ItemRemoved += LstToImages_ItemRemoved;
43 48
            lstToImages.VisualItemFormatting += LstImages_VisualItemFormatting;
44 49
            lstToImages.EditorInitialized += LstToImages_EditorInitialized;
45 50
            lstFrImages.SelectedItemChanged += LstImages_SelectedItemChanged;
51
            lstFrImages.ItemRemoving += LstFrImages_ItemRemoving;
46 52
            lstFrImages.ItemRemoved += LstFrImages_ItemRemoved;
47 53
            lstFrImages.VisualItemFormatting += LstImages_VisualItemFormatting;
48 54
            lstFrImages.EditorInitialized += LstFrImages_EditorInitialized;
55

  
56
            this.IsClient = !string.IsNullOrEmpty(informations.ActiveUser.RefProjectID);
57
            txtBriefDoftech.ReadOnly = this.IsClient;
58
            txtBriefSec.ReadOnly = !this.IsClient;
49 59
        }
50 60

  
51 61
        private void LstToImages_EditorInitialized(object sender, ListViewItemEditorInitializedEventArgs e)
......
56 66
        {
57 67
        }
58 68

  
69
        private void LstToImages_ItemRemoving(object sender, ListViewItemCancelEventArgs e)
70
        {
71
            if (RemoveImage != null)
72
            {
73
                e.Cancel = this.IsClient;
74
            }
75
        }
76

  
59 77
        private void LstToImages_ItemRemoved(object sender, ListViewItemEventArgs e)
60 78
        {
61 79
            if (RemoveImage != null)
......
63 81
                RemoveImage(this, e.Item.DataBoundItem as AttImageInfo);
64 82
            }
65 83
        }
84

  
85
        private void LstFrImages_ItemRemoving(object sender, ListViewItemCancelEventArgs e)
86
        {
87
            if (RemoveImage != null)
88
            {
89
                e.Cancel = !this.IsClient;
90
            }
91
        }
92

  
66 93
        private void LstFrImages_ItemRemoved(object sender, ListViewItemEventArgs e)
67 94
        {
68 95
            if (RemoveImage != null)
......
271 298
public class AttImageInfo
272 299
{
273 300
    public string ID { get; set; }
301
    public string Category { get; set; }
274 302
    public byte[] Data { get; set; }
275 303
}

내보내기 Unified diff

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