개정판 cd53eb32
issue #0000
- user list 변경 후 리스트 다시 바인딩 되도록 수정
- user 등록/수정 시 유효성 체크 수정
Change-Id: I658d081a374478d1a40921cf3db2617aea2e25c6
ID2.Manager/ID2.Manager/Forms/AddUser.cs | ||
---|---|---|
34 | 34 |
{ |
35 | 35 |
InitializeComponent(); |
36 | 36 |
|
37 |
this.Initialize(); |
|
38 |
|
|
39 | 37 |
this.UserInfo = userInfo; |
38 |
|
|
39 |
this.Initialize(); |
|
40 | 40 |
} |
41 | 41 |
|
42 | 42 |
private void Initialize() |
... | ... | |
67 | 67 |
} |
68 | 68 |
else |
69 | 69 |
{ |
70 |
this.radTextBoxUserID.ReadOnly = true;
|
|
70 |
this.radTextBoxUserID.Enabled = false;
|
|
71 | 71 |
|
72 | 72 |
this.radTextBoxUserID.Text = this.UserInfo.ID; |
73 | 73 |
this.radTextBoxUserName.Text = this.UserInfo.Name; |
... | ... | |
86 | 86 |
string password = this.radTextBoxPassword.Text.Trim(); |
87 | 87 |
string confirm = this.radTextBoxConfirm.Text.Trim(); |
88 | 88 |
|
89 |
if (string.IsNullOrEmpty(userId))
|
|
89 |
if (this.UserInfo.UID == null)
|
|
90 | 90 |
{ |
91 |
RadMessageBox.Show("Please enter the ID.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
92 |
this.radTextBoxUserID.Focus(); |
|
93 |
return; |
|
94 |
} |
|
95 |
else |
|
96 |
{ |
|
97 |
bool isValid = Globals.IsMatchEmailFormat(userId); |
|
98 |
if (isValid) |
|
91 |
if (string.IsNullOrEmpty(userId)) |
|
99 | 92 |
{ |
100 |
if (informations.UserList.Any(x => x.ID.Equals(userId))) |
|
101 |
{ |
|
102 |
RadMessageBox.Show("ID already exists.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
103 |
this.radTextBoxUserID.Focus(); |
|
104 |
return; |
|
105 |
} |
|
93 |
RadMessageBox.Show("Please enter the ID.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
94 |
this.radTextBoxUserID.Focus(); |
|
95 |
return; |
|
106 | 96 |
} |
107 | 97 |
else |
108 | 98 |
{ |
109 |
RadMessageBox.Show("The ID does not match the email format.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
110 |
this.radTextBoxUserID.Focus(); |
|
111 |
return; |
|
99 |
if (string.IsNullOrEmpty(userId)) |
|
100 |
{ |
|
101 |
RadMessageBox.Show("Please enter the ID.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
102 |
this.radTextBoxUserName.Focus(); |
|
103 |
return; |
|
104 |
} |
|
105 |
else |
|
106 |
{ |
|
107 |
bool isValid = Globals.IsMatchEmailFormat(userId); |
|
108 |
if (isValid) |
|
109 |
{ |
|
110 |
if (informations.UserList.Any(x => x.ID.Equals(userId))) |
|
111 |
{ |
|
112 |
RadMessageBox.Show("ID already exists.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
113 |
this.radTextBoxUserID.Focus(); |
|
114 |
return; |
|
115 |
} |
|
116 |
} |
|
117 |
else |
|
118 |
{ |
|
119 |
RadMessageBox.Show("The ID does not match the email format.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
120 |
this.radTextBoxUserID.Focus(); |
|
121 |
return; |
|
122 |
} |
|
123 |
} |
|
112 | 124 |
} |
113 |
} |
|
125 |
}
|
|
114 | 126 |
if (string.IsNullOrEmpty(userName)) |
115 | 127 |
{ |
116 | 128 |
RadMessageBox.Show("Please enter the Name.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
... | ... | |
126 | 138 |
return; |
127 | 139 |
} |
128 | 140 |
} |
129 |
if (this.UserInfo == null && string.IsNullOrEmpty(password)) |
|
141 |
if (this.UserInfo.UID == null && string.IsNullOrEmpty(password))
|
|
130 | 142 |
{ |
131 | 143 |
RadMessageBox.Show("Please enter the Password.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
132 | 144 |
this.radTextBoxPassword.Focus(); |
ID2.Manager/ID2.Manager/Forms/SetupUser.cs | ||
---|---|---|
57 | 57 |
colProject.DisplayMember = "Name"; |
58 | 58 |
colProject.ValueMember = "ProjectID"; |
59 | 59 |
|
60 |
if (this.radGridViewUser.DataSource != null) |
|
61 |
{ |
|
62 |
this.radGridViewUser.DataSource = null; |
|
63 |
} |
|
64 |
|
|
60 | 65 |
this.radGridViewUser.DataSource = informations.UserList; |
61 | 66 |
} |
62 | 67 |
catch (Exception ex) |
내보내기 Unified diff