프로젝트

일반

사용자정보

개정판 78cffba9

ID78cffba9053780f2745201499bf40f0103aa8e72
상위 ad3c4ac3
하위 5307e38b

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

Insert Dialog Final & Convert Validation 완료

Change-Id: I1132b9a0c0e9e3aab0bf5e79770529f81bec4a81

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/ConvertAddDialogViewModel.cs
13 13

  
14 14
namespace Markus.Service.StationController.ViewModel
15 15
{
16
    class ConvertAddDialogViewModel : Mvvm.ToolKit.ViewModelBase, IDataErrorInfo
16
    class ConvertAddDialogViewModel : Mvvm.ToolKit.ViewModelBase
17 17
    {
18 18
        #region Construrtor
19 19

  
......
24 24

  
25 25
        #endregion
26 26

  
27
        #region IDataErrorInfo Members
28

  
29
        public string Error
30
        {
31
            get { throw new NotImplementedException(); }
32
        }
33

  
34
        public string this[string columnName]
35
        {
36
            get
37
            {
38
                string result = null;
39
                if (string.IsNullOrEmpty(ConverAdd_Project_NO))
40
                {
41
                    if (string.IsNullOrEmpty(ConverAdd_Project_NO))
42
                        result = "Please enter a Project NO";
43
                }
44
                if (columnName == "ConverAdd_DOCUMENT_ID")
45
                {
46
                    if (string.IsNullOrEmpty(ConverAdd_DOCUMENT_ID))
47
                        result = "Please enter a DOCUMENT ID";
48
                }
49
                if (columnName == "ConverAdd_DOCUMENT_URL")
50
                {
51
                    if (string.IsNullOrEmpty(ConverAdd_DOCUMENT_URL))
52
                        result = "Please enter a DOCUMENT URL";
53
                }
54
                return result;
55
            }
56
        }
57

  
58
        #endregion
59

  
60 27
        #region Propertise
61 28

  
62 29
        DataService.DataServiceClient WcfClient = new DataService.DataServiceClient();
......
241 208
                Project_NO_Color = "";
242 209
                DOCUMENT_ID_Color = "";
243 210
                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
                //}
259 211
            }
260 212
            else
261 213
            {
......
282 234

  
283 235
        #endregion
284 236
    }
285
    public class NameValidator : ValidationRule
286
    {
287
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
288
        {
289
            if (value == null)
290
                return new ValidationResult(false, "value cannot be empty.");
291

  
292
            return ValidationResult.ValidResult;
293
        }
294
    }
295 237
}

내보내기 Unified diff

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