개정판 aaed7be2
Filter Enter후 검색 TEST완료 & ADd ProjectNo 콤보박스 & Clear -> Selected All
Change-Id: Ifa232bf81e28f0a7dd325d094ae75640cda69bca
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/ConvertAddDialogViewModel.cs | ||
---|---|---|
10 | 10 |
using System.Windows; |
11 | 11 |
using System.Windows.Controls; |
12 | 12 |
using System.ComponentModel; |
13 |
using Markus.Service.StationController.Data; |
|
14 |
using System.Collections.ObjectModel; |
|
13 | 15 |
|
14 | 16 |
namespace Markus.Service.StationController.ViewModel |
15 | 17 |
{ |
... | ... | |
19 | 21 |
|
20 | 22 |
public ConvertAddDialogViewModel() |
21 | 23 |
{ |
24 |
ProjectName(); |
|
22 | 25 |
ConverAdd_OKCommand = new DelegateCommand(ConverAdd_OK); |
23 | 26 |
} |
24 | 27 |
|
25 |
#endregion |
|
26 |
|
|
27 |
#region Propertise |
|
28 |
|
|
29 |
DataService.DataServiceClient WcfClient = new DataService.DataServiceClient(); |
|
30 |
|
|
31 |
private string _ConverAdd_Project_NO; |
|
32 |
public string ConverAdd_Project_NO |
|
28 |
private async void ProjectName() |
|
33 | 29 |
{ |
34 |
get { return _ConverAdd_Project_NO; } |
|
35 |
set |
|
30 |
if (ProjectNames.Count() == 0) |
|
36 | 31 |
{ |
37 |
if (_ConverAdd_Project_NO != value)
|
|
32 |
foreach (var x in await WcfClient.GET_SELECT_RUN_PROJECTSAsync(0))
|
|
38 | 33 |
{ |
39 |
_ConverAdd_Project_NO = value;
|
|
40 |
OnPropertyChanged(() => ConverAdd_Project_NO);
|
|
34 |
ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME);
|
|
35 |
ProjectNames.Add(projectName);
|
|
41 | 36 |
} |
42 | 37 |
} |
43 | 38 |
} |
39 |
#endregion |
|
40 |
|
|
41 |
#region Propertise |
|
42 |
|
|
43 |
DataService.DataServiceClient WcfClient = new DataService.DataServiceClient(); |
|
44 | 44 |
|
45 | 45 |
private string _ConverAdd_DOCUMENT_ID; |
46 | 46 |
public string ConverAdd_DOCUMENT_ID |
... | ... | |
76 | 76 |
get { return _Project_NO_Border; } |
77 | 77 |
set |
78 | 78 |
{ |
79 |
if (ConverAdd_Project_NO != null)
|
|
79 |
if (ProjectNames.Contains(ProjectNumberFilter))
|
|
80 | 80 |
{ |
81 | 81 |
_Project_NO_Border = "#FF000000"; |
82 | 82 |
OnPropertyChanged(() => Project_NO_Border); |
... | ... | |
133 | 133 |
get { return _Project_NO_Color; } |
134 | 134 |
set |
135 | 135 |
{ |
136 |
if (ConverAdd_Project_NO != null)
|
|
136 |
if (ProjectNames.Contains(ProjectNumberFilter))
|
|
137 | 137 |
{ |
138 | 138 |
_Project_NO_Color = "#FFFFFFFF"; |
139 | 139 |
OnPropertyChanged(() => Project_NO_Color); |
... | ... | |
183 | 183 |
} |
184 | 184 |
} |
185 | 185 |
} |
186 |
|
|
187 |
public ObservableCollection<ProjectName> _ProjectNames; |
|
188 |
public ObservableCollection<ProjectName> ProjectNames |
|
189 |
{ |
|
190 |
get |
|
191 |
{ |
|
192 |
if (_ProjectNames == null) |
|
193 |
{ |
|
194 |
_ProjectNames = new System.Collections.ObjectModel.ObservableCollection<ProjectName>(); |
|
195 |
} |
|
196 |
|
|
197 |
return _ProjectNames; |
|
198 |
} |
|
199 |
set |
|
200 |
{ |
|
201 |
_ProjectNames = value; |
|
202 |
OnPropertyChanged(() => ProjectNames); |
|
203 |
} |
|
204 |
} |
|
205 |
|
|
206 |
public ProjectName _ProjectNumberFilter; |
|
207 |
public ProjectName ProjectNumberFilter |
|
208 |
{ |
|
209 |
get |
|
210 |
{ |
|
211 |
if (_ProjectNumberFilter == null) |
|
212 |
{ |
|
213 |
_ProjectNumberFilter = new ProjectName(); |
|
214 |
} |
|
215 |
return _ProjectNumberFilter; |
|
216 |
} |
|
217 |
set |
|
218 |
{ |
|
219 |
_ProjectNumberFilter = value; |
|
220 |
OnPropertyChanged(() => ProjectNumberFilter); |
|
221 |
} |
|
222 |
} |
|
186 | 223 |
#endregion |
187 | 224 |
|
188 | 225 |
#region Command |
... | ... | |
200 | 237 |
/// </summary> |
201 | 238 |
public async void ConverAdd_OK(object obj) |
202 | 239 |
{ |
203 |
if (String.IsNullOrEmpty(ConverAdd_Project_NO) || String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL)|| String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID) )
|
|
240 |
if (String.IsNullOrEmpty(ProjectNumberFilter.Project_NO) || String.IsNullOrEmpty(ConverAdd_DOCUMENT_URL) || String.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
|
|
204 | 241 |
{ |
205 |
Project_NO_Border =""; |
|
242 |
Project_NO_Border = "";
|
|
206 | 243 |
DOCUMENT_ID_Border = ""; |
207 | 244 |
DOCUMENT_URL_Border = ""; |
208 | 245 |
Project_NO_Color = ""; |
... | ... | |
214 | 251 |
try |
215 | 252 |
{ |
216 | 253 |
string ConverAdd_ID = GuidExtension.shortGuid(); |
217 |
var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, ConverAdd_Project_NO, ConverAdd_DOCUMENT_URL, ConverAdd_DOCUMENT_ID);
|
|
254 |
var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, ProjectNumberFilter.Project_NO, ConverAdd_DOCUMENT_URL, ConverAdd_DOCUMENT_ID);
|
|
218 | 255 |
System.Diagnostics.Debug.WriteLine(items); |
219 | 256 |
|
220 | 257 |
MessageBox.Show("데이터베이스에 추가 완료! "); |
... | ... | |
223 | 260 |
{ |
224 | 261 |
MessageBox.Show(ex.ToString()); |
225 | 262 |
} |
263 |
Project_NO_Border = ""; |
|
264 |
DOCUMENT_ID_Border = ""; |
|
265 |
DOCUMENT_URL_Border = ""; |
|
266 |
Project_NO_Color = ""; |
|
267 |
DOCUMENT_ID_Color = ""; |
|
268 |
DOCUMENT_URL_Color = ""; |
|
226 | 269 |
|
227 |
ConverAdd_Project_NO = null; |
|
228 | 270 |
ConverAdd_DOCUMENT_ID = null; |
229 | 271 |
ConverAdd_DOCUMENT_URL = null; |
230 | 272 |
} |
내보내기 Unified diff