프로젝트

일반

사용자정보

개정판 aaed7be2

IDaaed7be2a35a57346ae926655437a9fd8764ebba
상위 29cd086e
하위 2917ab4a

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

Filter Enter후 검색 TEST완료 & ADd ProjectNo 콤보박스 & Clear -> Selected All

Change-Id: Ifa232bf81e28f0a7dd325d094ae75640cda69bca

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFAddDialogViewModel.cs
6 6
using System.Threading.Tasks;
7 7
using System.Windows;
8 8
using Telerik.Windows.Controls;
9
using Markus.Service.StationController.Data;
10
using System.Collections.ObjectModel;
9 11

  
10 12
namespace Markus.Service.StationController.ViewModel
11 13
{
......
15 17

  
16 18
        public FinalPDFAddDialogViewModel()
17 19
        {
20
            ProjectName();
18 21
            FinalPDFAdd_OKCommand = new DelegateCommand(FinalPDFAdd_OK);
19 22
        }
20 23

  
24
        private async void ProjectName()
25
        {
26
            if (ProjectNames.Count() == 0)
27
            {
28
                foreach (var x in await WcfClient.GET_SELECT_RUN_PROJECTSAsync(0))
29
                {
30
                    ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME);
31
                    ProjectNames.Add(projectName);
32
                }
33
            }
34
        }
21 35
        #endregion
22 36

  
23 37
        #region Propertise
24 38

  
25 39
        DataService.DataServiceClient WcfClient = new DataService.DataServiceClient();
26 40

  
27
        private string _FinalPDFAdd_Project_NO;
28
        public string FinalPDFAdd_Project_NO
29
        {
30
            get { return _FinalPDFAdd_Project_NO; }
31
            set
32
            {
33
                _FinalPDFAdd_Project_NO = value;
34
                OnPropertyChanged(() => FinalPDFAdd_Project_NO);
35
            }
36
        }
37

  
38 41
        private string _FinalPDFAdd_Document_ID;
39 42
        public string FinalPDFAdd_Document_ID
40 43
        {
......
63 66
            get { return _Project_NO_Border; }
64 67
            set
65 68
            {
66
                if (FinalPDFAdd_Project_NO != null)
69
                if (ProjectNames.Contains(ProjectNumberFilter))
67 70
                {
68 71
                    _Project_NO_Border = "#FF000000";
69 72
                    OnPropertyChanged(() => Project_NO_Border);
......
120 123
            get { return _Project_NO_Color; }
121 124
            set
122 125
            {
123
                if (FinalPDFAdd_Project_NO != null)
126
                if (ProjectNames.Contains(ProjectNumberFilter))
124 127
                {
125 128
                    _Project_NO_Color = "#FFFFFFFF";
126 129
                    OnPropertyChanged(() => Project_NO_Color);
......
170 173
                }
171 174
            }
172 175
        }
176

  
177
        public ObservableCollection<ProjectName> _ProjectNames;
178
        public ObservableCollection<ProjectName> ProjectNames
179
        {
180
            get
181
            {
182
                if (_ProjectNames == null)
183
                {
184
                    _ProjectNames = new System.Collections.ObjectModel.ObservableCollection<ProjectName>();
185
                }
186

  
187
                return _ProjectNames;
188
            }
189
            set
190
            {
191
                _ProjectNames = value;
192
                OnPropertyChanged(() => ProjectNames);
193
            }
194
        }
195

  
196
        public ProjectName _ProjectNumberFilter;
197
        public ProjectName ProjectNumberFilter
198
        {
199
            get
200
            {
201
                if (_ProjectNumberFilter == null)
202
                {
203
                    _ProjectNumberFilter = new ProjectName();
204
                }
205
                return _ProjectNumberFilter;
206
            }
207
            set
208
            {
209
                _ProjectNumberFilter = value;
210
                OnPropertyChanged(() => ProjectNumberFilter);
211
            }
212
        }
173 213
        #endregion
174 214

  
175 215
        #region Command
......
187 227
        /// </summary>
188 228
        public async void FinalPDFAdd_OK(object obj)
189 229
        {
190
            if (String.IsNullOrEmpty(FinalPDFAdd_Project_NO) || String.IsNullOrEmpty(FinalPDFAdd_DocInfo_ID) || String.IsNullOrEmpty(FinalPDFAdd_Document_ID))
230
            if (String.IsNullOrEmpty(ProjectNumberFilter.Project_NO) || String.IsNullOrEmpty(FinalPDFAdd_Document_ID) || String.IsNullOrEmpty(FinalPDFAdd_DocInfo_ID))
191 231
            {
192 232
                Project_NO_Border = "";
193 233
                DOCUMENT_ID_Border = "";
......
201 241
                try
202 242
                {
203 243
                    string ConverAdd_ID = GuidExtension.shortGuid();
204
                    var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, FinalPDFAdd_Project_NO, FinalPDFAdd_DocInfo_ID, FinalPDFAdd_Document_ID);
244
                    var items = await WcfClient.GET_SELECT_CONVERT_INSERTAsync(ConverAdd_ID, ProjectNumberFilter.Project_NO, FinalPDFAdd_DocInfo_ID, FinalPDFAdd_Document_ID);
205 245
                    System.Diagnostics.Debug.WriteLine(items);
206 246

  
207 247
                    MessageBox.Show("데이터베이스에 추가 완료! ");
......
211 251
                    MessageBox.Show(ex.ToString());
212 252
                }
213 253

  
214
                FinalPDFAdd_Project_NO = null;
254
                Project_NO_Border = "";
255
                DOCUMENT_ID_Border = "";
256
                DocInfo_ID_Border = "";
257
                Project_NO_Color = "";
258
                DOCUMENT_ID_Color = "";
259
                DocInfo_ID_Color = "";
260

  
215 261
                FinalPDFAdd_DocInfo_ID = null;
216 262
                FinalPDFAdd_Document_ID = null;
217 263
            }

내보내기 Unified diff

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