프로젝트

일반

사용자정보

개정판 ad3c4ac3

IDad3c4ac346aae0b87fd9ecf9caa2bddb5929af21
상위 95e7bd84
하위 78cffba9

semi 이(가) 4년 이상 전에 추가함

add Dialog validation 완성

Change-Id: Idce8b540e3f9c356d9ce1c4929022d433922639e

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/ConvertAddDialogViewModel.cs
103 103
            }
104 104
        }
105 105

  
106
        private bool _Bool_Project_NO;
107
        public bool Bool_Project_NO
106
        private string _Project_NO_Border = "#FF000000";
107
        public string Project_NO_Border
108 108
        {
109
            get { return _Bool_Project_NO; }
109
            get { return _Project_NO_Border; }
110 110
            set
111 111
            {
112
                _Bool_Project_NO = value;
113
                OnPropertyChanged(() => Bool_Project_NO);
112
                if (ConverAdd_Project_NO != null)
113
                {
114
                    _Project_NO_Border = "#FF000000";
115
                    OnPropertyChanged(() => Project_NO_Border);
116
                }
117
                else
118
                {
119
                    _Project_NO_Border = "#FFFF0000";
120
                    OnPropertyChanged(() => Project_NO_Border);
121
                }
122
            }
123
        }
124

  
125
        private string _DOCUMENT_ID_Border = "#FF000000";
126
        public string DOCUMENT_ID_Border
127
        {
128
            get { return _DOCUMENT_ID_Border; }
129
            set
130
            {
131
                if (ConverAdd_DOCUMENT_ID != null)
132
                {
133
                    _DOCUMENT_ID_Border = "#FF000000";
134
                    OnPropertyChanged(() => DOCUMENT_ID_Border);
135
                }
136
                else
137
                {
138
                    _DOCUMENT_ID_Border = "#FFFF0000";
139
                    OnPropertyChanged(() => DOCUMENT_ID_Border);
140
                }
141
            }
142
        }
143

  
144
        private string _DOCUMENT_URL_Border = "#FF000000";
145
        public string DOCUMENT_URL_Border
146
        {
147
            get { return _DOCUMENT_URL_Border; }
148
            set
149
            {
150
                if (ConverAdd_DOCUMENT_URL != null)
151
                {
152
                    _DOCUMENT_URL_Border = "#FF000000";
153
                    OnPropertyChanged(() => DOCUMENT_URL_Border);
154
                }
155
                else
156
                {
157
                    _DOCUMENT_URL_Border = "#FFFF0000";
158
                    OnPropertyChanged(() => DOCUMENT_URL_Border);
159
                }
160
            }
161
        }
114 162

  
163
        private string _Project_NO_Color = "#FFFFFFFF";
164
        public string Project_NO_Color
165
        {
166
            get { return _Project_NO_Color; }
167
            set
168
            {
169
                if (ConverAdd_Project_NO != null)
170
                {
171
                    _Project_NO_Color = "#FFFFFFFF";
172
                    OnPropertyChanged(() => Project_NO_Color);
173
                }
174
                else
175
                {
176
                    _Project_NO_Color = "#FFFF0000";
177
                    OnPropertyChanged(() => Project_NO_Color);
178
                }
115 179
            }
116 180
        }
117 181

  
118
        private bool _Bool_DOCUMENT_ID;
119
        public bool Bool_DOCUMENT_ID
182
        private string _DOCUMENT_ID_Color = "#FFFFFFFF";
183
        public string DOCUMENT_ID_Color
120 184
        {
121
            get { return _Bool_DOCUMENT_ID; }
185
            get { return _DOCUMENT_ID_Color; }
122 186
            set
123 187
            {
124
                _Bool_DOCUMENT_ID = value;
125
                OnPropertyChanged(() => Bool_DOCUMENT_ID);
188
                if (ConverAdd_DOCUMENT_ID != null)
189
                {
190
                    _DOCUMENT_ID_Color = "#FFFFFFFF";
191
                    OnPropertyChanged(() => DOCUMENT_ID_Color);
192
                }
193
                else
194
                {
195
                    _DOCUMENT_ID_Color = "#FFFF0000";
196
                    OnPropertyChanged(() => DOCUMENT_ID_Color);
197
                }
126 198
            }
127 199
        }
128 200

  
201
        private string _DOCUMENT_URL_Color = "#FFFFFFFF";
202
        public string DOCUMENT_URL_Color
203
        {
204
            get { return _DOCUMENT_URL_Color; }
205
            set
206
            {
207
                if (ConverAdd_DOCUMENT_URL != null)
208
                {
209
                    _DOCUMENT_URL_Color = "#FFFFFFFF";
210
                    OnPropertyChanged(() => DOCUMENT_URL_Color);
211
                }
212
                else
213
                {
214
                    _DOCUMENT_URL_Color = "#FFFF0000";
215
                    OnPropertyChanged(() => DOCUMENT_URL_Color);
216
                }
217
            }
218
        }
129 219
        #endregion
130 220

  
131 221
        #region Command
......
145 235
        {
146 236
            if (String.IsNullOrEmpty(ConverAdd_Project_NO) || String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL)|| String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID) )
147 237
            {
148
                if (String.IsNullOrEmpty(ConverAdd_Project_NO))
149
                {
150
                    ConverAdd_Project_NO = "Project_NOisEmpty";
151
                }
152
                if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL))
153
                {
154
                    ConverAdd_DOCUMENT_URL = "DOCUMENT_URLisEmpty";
155
                }
156
                if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
157
                {
158
                    ConverAdd_DOCUMENT_ID = "DOCUMENT_IDisEmpty";
159
                }
238
                Project_NO_Border ="";
239
                DOCUMENT_ID_Border = "";
240
                DOCUMENT_URL_Border = "";
241
                Project_NO_Color = "";
242
                DOCUMENT_ID_Color = "";
243
                DOCUMENT_URL_Color = "";
244
                //if (String.IsNullOrEmpty(ConverAdd_Project_NO))
245
                //{
246
                //    //ConverAdd_Project_NO = "Project_NOisEmpty";
247
                //    Project_NO_Border = "#FFFF0000";
248
                //}
249
                //if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL))
250
                //{
251
                //    //ConverAdd_DOCUMENT_URL = "DOCUMENT_URLisEmpty";
252
                //    DOCUMENT_URL_Border = "#FFFF0000";
253
                //}
254
                //if (String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
255
                //{
256
                //    //ConverAdd_DOCUMENT_ID = "DOCUMENT_IDisEmpty";
257
                //    DOCUMENT_ID_Border = "#FFFF0000";
258
                //}
160 259
            }
161 260
            else
162 261
            {
ConvertService/ServiceBase/Markus.Service.StationController/Views/ConvertAddDialog.xaml
57 57
                <RowDefinition />
58 58
                <RowDefinition Height="Auto" />
59 59
                <RowDefinition Height="Auto" />
60

  
60 61
            </Grid.RowDefinitions>
61 62

  
62 63
            <Grid Grid.Row="0" Margin="10" Grid.ColumnSpan="2">
......
70 71
                    <ColumnDefinition Width="1.5*"/>
71 72
                </Grid.ColumnDefinitions>
72 73
                <Grid.RowDefinitions>
74
                    <RowDefinition Height="12"/>
73 75
                    <RowDefinition />
76
                    <RowDefinition Height="12"/>
74 77
                    <RowDefinition />
75 78
                </Grid.RowDefinitions>
76
                <TextBlock Grid.Row="0" Text="Project NO" />
77
                <TextBlock Grid.Row="0" Grid.Column="4" Text="DOCUMENT ID" />
78
                <TextBlock Grid.Row="1" Grid.Column="0" Text="Document URL" />
79
                <TextBlock Grid.Row="1" Text="Project NO" />
80
                <TextBlock Grid.Row="1" Grid.Column="4" Text="DOCUMENT ID" />
81
                <TextBlock Grid.Row="3" Grid.Column="0" Text="Document URL" />
82

  
83
                <TextBox Text="{Binding ConverAdd_Project_NO, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="2" BorderBrush="{Binding Project_NO_Border}" />
84
                <TextBox Text="{Binding ConverAdd_DOCUMENT_ID, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="6" BorderBrush="{Binding DOCUMENT_ID_Border}"/>
85
                <TextBox Text="{Binding ConverAdd_DOCUMENT_URL,  Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged }" Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="5" BorderBrush="{Binding DOCUMENT_URL_Border}" />
86

  
87
                <DockPanel Grid.Column="2" Grid.Row="0">
88
                    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
89
                        <Grid Width="12" Height="12">
90
                            <Ellipse Width="12" Height="12" Fill="{Binding Project_NO_Color}" HorizontalAlignment="Center" VerticalAlignment="Center" ></Ellipse>
91
                            <TextBlock Foreground="White" FontWeight="Heavy" FontSize="8" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"  
92
                                           ToolTip="{Binding ElementName=ErrorAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" >!</TextBlock>
93
                        </Grid>
94
                        <TextBlock  HorizontalAlignment="Left" VerticalAlignment="Top" Text="ProjectNO empty" FontSize="9" Foreground="{Binding Project_NO_Color}" />
95
                    </StackPanel>
96
                </DockPanel>
97
                <DockPanel Grid.Column="6" Grid.Row="0">
98
                    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
99
                        <Grid Width="12" Height="12">
100
                            <Ellipse Width="12" Height="12" HorizontalAlignment="Center" VerticalAlignment="Center"
101
                                     Fill="{Binding DOCUMENT_ID_Color}"/>
102
                            <TextBlock Foreground="White" FontWeight="Heavy" FontSize="8" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"  
103
                                           ToolTip="{Binding ElementName=ErrorAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" >!</TextBlock>
104
                        </Grid>
105
                        <TextBlock  HorizontalAlignment="Left" VerticalAlignment="Top" Text="DOCUMENT ID empty" FontSize="9" Foreground="{Binding DOCUMENT_ID_Color}" />
106
                    </StackPanel>
107
                </DockPanel>
108
                
109
                <DockPanel Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="5" >
110
                    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
111
                        <Grid Width="12" Height="12">
112
                            <Ellipse Width="12" Height="12" Fill="{Binding DOCUMENT_URL_Color}" HorizontalAlignment="Center" VerticalAlignment="Center" />
113
                            <TextBlock Foreground="White" FontWeight="Heavy" FontSize="8" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"  
114
                                           ToolTip="{Binding ElementName=ErrorAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"  >!</TextBlock>
115
                        </Grid>
116
                        <TextBlock  HorizontalAlignment="Left" VerticalAlignment="Top" Text="DOCUMENT URL empty" FontSize="9" Foreground="{Binding DOCUMENT_URL_Color}" />
117
                    </StackPanel>
118
                </DockPanel>
79 119

  
80
                <TextBox Text="{Binding ConverAdd_Project_NO, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Grid.Row="0" Grid.Column="2" />
81
                <TextBox Text="{Binding ConverAdd_DOCUMENT_ID, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged,  ValidatesOnDataErrors=True }" Grid.Row="0" Grid.Column="6" />
82
                <TextBox Text="{Binding ConverAdd_DOCUMENT_URL,  Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True }" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="5"/>
83
           
84 120
            </Grid>
85
            
121

  
86 122
            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0 0 0 10" Grid.Column="1">
87 123

  
88 124
                <telerik:RadButton Content=" SEND" MinWidth="50" Margin="8 0" VerticalAlignment="Center"

내보내기 Unified diff

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