개정판 416979ec
issue #000
ID2 Project 미등록 DWG_ID 등록 가능하도록 수정
조회 시 ID2 Project 미등록 조건 추가
Documents 필수값 ID2 Project, DocumentNo
Excel Import 시 ID2 Project, DocumentNo trim 적용
Change-Id: I3d6d37e88939bbed791b3ad00ba21608eea85f79
ID2.Manager/ID2.Manager.Common/Helpers/ID2Excel.cs | ||
---|---|---|
189 | 189 |
{ |
190 | 190 |
case 9: |
191 | 191 |
var prjInfo = this.GetProject(value); |
192 |
document.RefProjectCode = prjInfo.Code; |
|
192 |
//document.RefProjectCode = prjInfo.Code; |
|
193 |
document.RefProjectCode = string.IsNullOrEmpty(value) ? value : value.Trim(); |
|
193 | 194 |
if (!string.IsNullOrEmpty(document.RefProjectCode)) |
194 | 195 |
{ |
195 | 196 |
document.Team = prjInfo.Team; |
... | ... | |
202 | 203 |
document.SubSystemCode = value; |
203 | 204 |
break; |
204 | 205 |
case 12: |
205 |
document.DocumentNo = value;
|
|
206 |
document.DocumentNo = string.IsNullOrEmpty(value) ? value : value.Trim();
|
|
206 | 207 |
break; |
207 | 208 |
case 13: |
208 | 209 |
document.PersonInCharge = this.GetUser(value).ID; |
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs | ||
---|---|---|
106 | 106 |
sbWhere.Append(" and prj.Team=@Team "); |
107 | 107 |
parameters.Add("Team", team); |
108 | 108 |
} |
109 |
if (string.IsNullOrEmpty(projectCode))
|
|
109 |
if (projectCode == null)
|
|
110 | 110 |
{ |
111 |
sbWhere.Append(" and isnull(doc.RefProjectCode,'') in (select Code from dbo.Projects where ParentID=@RefGroupID union all select '') "); |
|
112 |
sbTotalWhere.Append(" and isnull(doc.RefProjectCode,'') in (select Code from dbo.Projects where ParentID=@RefGroupID union all select '') "); |
|
111 |
sbTotalWhere.Append(" and doc.RefProjectCode in (select Code from dbo.Projects where ParentID=@RefGroupID) "); |
|
112 |
parameters.Add("RefGroupID", projectGroupID); |
|
113 |
|
|
114 |
sbWhere.Append(" and prj.Code is null "); |
|
115 |
} |
|
116 |
else if (projectCode.Equals(string.Empty)) |
|
117 |
{ |
|
118 |
sbWhere.Append(" and doc.RefProjectCode in (select Code from dbo.Projects where ParentID=@RefGroupID) "); |
|
119 |
sbTotalWhere.Append(" and doc.RefProjectCode in (select Code from dbo.Projects where ParentID=@RefGroupID) "); |
|
113 | 120 |
parameters.Add("RefGroupID", projectGroupID); |
114 | 121 |
} |
115 | 122 |
else |
116 | 123 |
{ |
117 |
sbTotalWhere.Append(" and isnull(doc.RefProjectCode,'') in (select Code from dbo.Projects where ParentID=@RefGroupID union all select '') ");
|
|
124 |
sbTotalWhere.Append(" and doc.RefProjectCode in (select Code from dbo.Projects where ParentID=@RefGroupID) ");
|
|
118 | 125 |
parameters.Add("RefGroupID", projectGroupID); |
119 | 126 |
|
120 | 127 |
sbWhere.Append(" and doc.RefProjectCode=@RefProjectCode "); |
... | ... | |
217 | 224 |
where doc.IsDeleted=0 {sbWhere} |
218 | 225 |
order by doc.Seq |
219 | 226 |
|
220 |
select @Total=count(*) from dbo.Documents doc where doc.IsDeleted=0 {sbTotalWhere} |
|
221 |
select @Total;"; |
|
227 |
select @Total=count(*) from dbo.Documents doc where doc.IsDeleted=0 {sbTotalWhere};"; |
|
222 | 228 |
|
223 | 229 |
if (parameters.Count > 0) |
224 | 230 |
{ |
... | ... | |
335 | 341 |
return existCount; |
336 | 342 |
} |
337 | 343 |
|
344 |
// public bool ExistsNotRegID2ProjectDocuments() |
|
345 |
// { |
|
346 |
// try |
|
347 |
// { |
|
348 |
// string query = $@" |
|
349 |
//select top 1 * |
|
350 |
//from dbo.Documents doc |
|
351 |
//where doc.IsDeleted=0 |
|
352 |
// and doc.RefProjectCode not in (select Code from dbo.Projects prj);"; |
|
353 |
|
|
354 |
// bool isRet = ExecuteScalar<int>(query, null) > 0; |
|
355 |
|
|
356 |
// return isRet; |
|
357 |
// } |
|
358 |
// catch (Exception ex) |
|
359 |
// { |
|
360 |
// throw ex; |
|
361 |
// } |
|
362 |
// } |
|
363 |
|
|
338 | 364 |
public bool SetDocumentData(string projectGroupID, List<Documents> docList, List<string> delDocList, string userId) |
339 | 365 |
{ |
340 | 366 |
bool isSuccess = false; |
... | ... | |
972 | 998 |
|
973 | 999 |
select RefProjectCode, DocumentNo |
974 | 1000 |
from dbo.Documents |
975 |
where (RegisteredDate between @CreatedDate and @EndDate) or (ModifiedDate between @CreatedDate and @EndDate)";
|
|
1001 |
where RefProjectCode is not null and ((RegisteredDate between @CreatedDate and @EndDate) or (ModifiedDate between @CreatedDate and @EndDate))";
|
|
976 | 1002 |
|
977 | 1003 |
if (parameters.Count > 0) |
978 | 1004 |
{ |
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
62 | 62 |
//#if DEBUG |
63 | 63 |
// Telerik.WinControls.RadControlSpy.RadControlSpyForm radControlSpyForm = new Telerik.WinControls.RadControlSpy.RadControlSpyForm(); |
64 | 64 |
//#endif |
65 |
private readonly Color _SummaryColor = Color.FromArgb(255, 108, 55); |
|
65 |
//private readonly Color _SummaryColor = Color.FromArgb(255, 108, 55);
|
|
66 | 66 |
|
67 | 67 |
public Main() |
68 | 68 |
{ |
... | ... | |
122 | 122 |
this.radCheckBoxWork.CheckStateChanged += RadCheckBox_CheckStateChanged; |
123 | 123 |
this.radCheckBoxVaildation.CheckStateChanged += RadCheckBox_CheckStateChanged; |
124 | 124 |
this.radCheckBoxAVEVANet.CheckStateChanged += RadCheckBox_CheckStateChanged; |
125 |
this.radTextBoxDocumentNo.TextChanged += RadTextBoxDocumentNo_TextChanged; |
|
125 | 126 |
this.radTextBoxDocumentNo.KeyDown += RadTextBoxDocumentNo_KeyDown; |
126 |
this.radTextBoxDocumentNo.KeyUp += RadTextBoxDocumentNo_KeyUp; |
|
127 |
//this.radTextBoxDocumentNo.KeyUp += RadTextBoxDocumentNo_KeyUp;
|
|
127 | 128 |
this.radButtonSearch.Click += RadButtonSearch_Click; |
128 | 129 |
#region 테마 설정 |
129 | 130 |
this.radMenuItemControlDefault.Click += RadMenuItemTheme_Click; |
... | ... | |
1002 | 1003 |
{ |
1003 | 1004 |
this.radDropDownListProject.Items.Add(new RadListDataItem(x.Name, x.Code)); |
1004 | 1005 |
}); |
1006 |
|
|
1007 |
this.radDropDownListProject.Items.Add(new RadListDataItem("== ID2 Project 미등록 ==", null));//ID2 Project 미등록 |
|
1008 |
|
|
1005 | 1009 |
var allProject = new RadListDataItem("== 전체 ==", string.Empty); |
1006 | 1010 |
this.radDropDownListProject.Items.Insert(0, allProject); |
1007 | 1011 |
allProject.Selected = true; |
... | ... | |
1180 | 1184 |
{ |
1181 | 1185 |
try |
1182 | 1186 |
{ |
1183 |
if (this.radDropDownListProject.SelectedValue != null) |
|
1184 |
{ |
|
1185 |
string team = this.radDropDownListTeam.SelectedValue.ToString(); |
|
1187 |
string team = this.radDropDownListTeam.SelectedValue.ToString(); |
|
1186 | 1188 |
|
1187 |
List<string> dateTypes = this.radCheckedDropDownListDateType.CheckedItems.Select(x => x.Value.ToString()).ToList();
|
|
1188 |
DateTime? frDate = this.radDateTimePickerFr.Value.Equals(this.radDateTimePickerFr.NullDate) ? (DateTime?)null : this.radDateTimePickerFr.Value;
|
|
1189 |
DateTime? toDate = this.radDateTimePickerTo.Value.Equals(this.radDateTimePickerTo.NullDate) ? (DateTime?)null : this.radDateTimePickerTo.Value;
|
|
1189 |
List<string> dateTypes = this.radCheckedDropDownListDateType.CheckedItems.Select(x => x.Value.ToString()).ToList(); |
|
1190 |
DateTime? frDate = this.radDateTimePickerFr.Value.Equals(this.radDateTimePickerFr.NullDate) ? (DateTime?)null : this.radDateTimePickerFr.Value; |
|
1191 |
DateTime? toDate = this.radDateTimePickerTo.Value.Equals(this.radDateTimePickerTo.NullDate) ? (DateTime?)null : this.radDateTimePickerTo.Value; |
|
1190 | 1192 |
|
1191 |
string projectCode = this.radDropDownListProject.SelectedValue.ToString();
|
|
1192 |
string personIncharge = this.radDropDownListPersonInCharge.SelectedValue.ToString();
|
|
1193 |
string jobLevel = this.radDropDownListJobLevel.SelectedValue.ToString();
|
|
1194 |
string documentNo = this.radTextBoxDocumentNo.Text.Trim();
|
|
1193 |
string projectCode = this.radDropDownListProject.SelectedValue?.ToString();
|
|
1194 |
string personIncharge = this.radDropDownListPersonInCharge.SelectedValue.ToString(); |
|
1195 |
string jobLevel = this.radDropDownListJobLevel.SelectedValue.ToString(); |
|
1196 |
string documentNo = this.radTextBoxDocumentNo.Text.Trim(); |
|
1195 | 1197 |
|
1196 |
string isToIsDiscussion = this.radDropDownListToIsDiscussion.SelectedValue.ToString();
|
|
1197 |
string isFrReviewStatus = this.radDropDownListFrReviewStatus.SelectedValue.ToString();
|
|
1198 |
string isToIsDiscussion = this.radDropDownListToIsDiscussion.SelectedValue.ToString(); |
|
1199 |
string isFrReviewStatus = this.radDropDownListFrReviewStatus.SelectedValue.ToString(); |
|
1198 | 1200 |
|
1199 |
string id2Status = this.radDropDownListID2Status.SelectedValue.ToString();
|
|
1200 |
string id2Issues = this.radDropDownListID2Issues.SelectedValue.ToString();
|
|
1201 |
string avevaStatus = this.radDropDownListAVEVAStatus.SelectedValue.ToString();
|
|
1202 |
string avevaIssues = this.radDropDownListAVEVAIssues.SelectedValue.ToString();
|
|
1201 |
string id2Status = this.radDropDownListID2Status.SelectedValue.ToString(); |
|
1202 |
string id2Issues = this.radDropDownListID2Issues.SelectedValue.ToString(); |
|
1203 |
string avevaStatus = this.radDropDownListAVEVAStatus.SelectedValue.ToString(); |
|
1204 |
string avevaIssues = this.radDropDownListAVEVAIssues.SelectedValue.ToString(); |
|
1203 | 1205 |
|
1204 |
string prodIsResult = this.radDropDownListProdIsResult.SelectedValue.ToString();
|
|
1205 |
string clientIsResult = this.radDropDownListClientIsResult.SelectedValue.ToString();
|
|
1206 |
string prodIsResult = this.radDropDownListProdIsResult.SelectedValue.ToString(); |
|
1207 |
string clientIsResult = this.radDropDownListClientIsResult.SelectedValue.ToString(); |
|
1206 | 1208 |
|
1207 |
string isGateWay = this.radDropDownListGateway.SelectedValue.ToString();
|
|
1208 |
string isRegSystem = this.radDropDownListRegistration.SelectedValue.ToString();
|
|
1209 |
string isGateWay = this.radDropDownListGateway.SelectedValue.ToString(); |
|
1210 |
string isRegSystem = this.radDropDownListRegistration.SelectedValue.ToString(); |
|
1209 | 1211 |
|
1210 |
var worker = new LoadDocumentsWorker(dateTypes, frDate, toDate, team, projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, id2Status, id2Issues, avevaStatus, avevaIssues, prodIsResult, clientIsResult, isGateWay, isRegSystem, this.radGridViewDocuments);
|
|
1211 |
worker.OnWorkCompletedHandler += (e) =>
|
|
1212 |
{
|
|
1213 |
var docData = e.Result as DocumentsResult;
|
|
1212 |
var worker = new LoadDocumentsWorker(dateTypes, frDate, toDate, team, projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, id2Status, id2Issues, avevaStatus, avevaIssues, prodIsResult, clientIsResult, isGateWay, isRegSystem, this.radGridViewDocuments); |
|
1213 |
worker.OnWorkCompletedHandler += (e) => |
|
1214 |
{ |
|
1215 |
var docData = e.Result as DocumentsResult; |
|
1214 | 1216 |
|
1215 |
this.documents = docData.Dwgs;
|
|
1216 |
this.orgDocuments = JsonConvert.DeserializeObject<List<Documents>>(JsonConvert.SerializeObject(docData.Dwgs));
|
|
1217 |
this.TotalCount = docData.TotalCount;
|
|
1218 |
this.SearchCount = docData.Dwgs.Count;
|
|
1217 |
this.documents = docData.Dwgs; |
|
1218 |
this.orgDocuments = JsonConvert.DeserializeObject<List<Documents>>(JsonConvert.SerializeObject(docData.Dwgs)); |
|
1219 |
this.TotalCount = docData.TotalCount; |
|
1220 |
this.SearchCount = docData.Dwgs.Count; |
|
1219 | 1221 |
|
1220 |
List<string> projectCodes = new List<string>();
|
|
1222 |
List<string> projectCodes = new List<string>(); |
|
1221 | 1223 |
|
1222 |
if (!string.IsNullOrWhiteSpace(projectCode))
|
|
1223 |
{
|
|
1224 |
projectCodes.Add(projectCode);
|
|
1225 |
}
|
|
1226 |
else
|
|
1227 |
{
|
|
1228 |
projectCodes = informations.ProjectList.Select(x => x.Code).ToList();
|
|
1229 |
}
|
|
1224 |
if (!string.IsNullOrWhiteSpace(projectCode)) |
|
1225 |
{ |
|
1226 |
projectCodes.Add(projectCode); |
|
1227 |
} |
|
1228 |
else |
|
1229 |
{ |
|
1230 |
projectCodes = informations.ProjectList.Select(x => x.Code).ToList(); |
|
1231 |
} |
|
1230 | 1232 |
|
1231 |
this.DocumentListBinding(isFilterClear);
|
|
1232 |
};
|
|
1233 |
this.DocumentListBinding(isFilterClear); |
|
1234 |
}; |
|
1233 | 1235 |
|
1234 |
(btnShowAllDetail.HostedItem as RadCheckBoxElement).Checked = false; |
|
1235 |
worker.StartWork(); |
|
1236 |
} |
|
1236 |
(btnShowAllDetail.HostedItem as RadCheckBoxElement).Checked = false; |
|
1237 |
worker.StartWork(); |
|
1237 | 1238 |
} |
1238 | 1239 |
catch (Exception ex) |
1239 | 1240 |
{ |
... | ... | |
1246 | 1247 |
try |
1247 | 1248 |
{ |
1248 | 1249 |
GridViewComboBoxColumn ColProjects = this.radGridViewDocuments.Columns["RefProjectCode"] as GridViewComboBoxColumn; |
1249 |
ColProjects.DataSource = informations.ProjectList.Where(x => x.GroupID.Equals(informations.ActiveProject.ProjectID)).ToList(); |
|
1250 |
ColProjects.DisplayMember = "Name"; |
|
1251 |
ColProjects.ValueMember = "Code"; |
|
1250 |
ColProjects.DataSource = informations.ProjectList.Where(x => x.GroupID.Equals(informations.ActiveProject.ProjectID)).Select(x => x.Code).ToList();
|
|
1251 |
//ColProjects.DisplayMember = "Name";
|
|
1252 |
//ColProjects.ValueMember = "Code";
|
|
1252 | 1253 |
|
1253 | 1254 |
var workUsers = informations.UserList.Where(x => (new string[] { "Manager", "User" }).Contains(x.Role) && string.IsNullOrEmpty(x.RefProjectID)); |
1254 | 1255 |
var clientUsers = informations.UserList.Where(x => !string.IsNullOrEmpty(x.RefProjectID)); |
... | ... | |
1348 | 1349 |
{ |
1349 | 1350 |
if (sender is RadDropDownList ddl) |
1350 | 1351 |
{ |
1351 |
if (ddl.SelectedValue != null) |
|
1352 |
string ddlSelectedValue = ddl.SelectedValue?.ToString(); |
|
1353 |
if (ddlSelectedValue == null) |
|
1352 | 1354 |
{ |
1353 |
if (string.IsNullOrEmpty(ddl.SelectedValue.ToString())) |
|
1354 |
{ |
|
1355 |
ddl.BackColor = Color.White; |
|
1356 |
ddl.ForeColor = Color.Black; |
|
1357 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular); |
|
1358 |
} |
|
1359 |
else |
|
1360 |
{ |
|
1361 |
ddl.BackColor = Color.DarkSlateBlue; |
|
1362 |
ddl.ForeColor = Color.Yellow; |
|
1363 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
|
1364 |
} |
|
1355 |
ddl.BackColor = Color.DarkSlateBlue; |
|
1356 |
ddl.ForeColor = Color.Yellow; |
|
1357 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
|
1358 |
} |
|
1359 |
else if (ddlSelectedValue.Equals(string.Empty)) |
|
1360 |
{ |
|
1361 |
ddl.BackColor = Color.White; |
|
1362 |
ddl.ForeColor = Color.Black; |
|
1363 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular); |
|
1364 |
} |
|
1365 |
else |
|
1366 |
{ |
|
1367 |
ddl.BackColor = Color.DarkSlateBlue; |
|
1368 |
ddl.ForeColor = Color.Yellow; |
|
1369 |
ddl.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
|
1365 | 1370 |
} |
1366 | 1371 |
} |
1367 | 1372 |
} |
... | ... | |
1408 | 1413 |
//ColumnGroupsViewDefinition columnGroupsView = this.radGridViewDocuments.MasterTemplate.ViewDefinition = columnGroupsView; |
1409 | 1414 |
} |
1410 | 1415 |
|
1411 |
private void RadTextBoxDocumentNo_KeyDown(object sender, KeyEventArgs e) |
|
1412 |
{ |
|
1413 |
if (e.KeyCode == Keys.Enter) |
|
1414 |
{ |
|
1415 |
this.radButtonSearch.Focus(); |
|
1416 |
this.radButtonSearch.PerformClick(); |
|
1417 |
} |
|
1418 |
} |
|
1419 |
|
|
1420 |
private void RadTextBoxDocumentNo_KeyUp(object sender, KeyEventArgs e) |
|
1416 |
private void RadTextBoxDocumentNo_TextChanged(object sender, EventArgs e) |
|
1421 | 1417 |
{ |
1422 | 1418 |
if (sender is RadTextBox txtBox) |
1423 | 1419 |
{ |
... | ... | |
1436 | 1432 |
} |
1437 | 1433 |
} |
1438 | 1434 |
|
1435 |
private void RadTextBoxDocumentNo_KeyDown(object sender, KeyEventArgs e) |
|
1436 |
{ |
|
1437 |
if (e.KeyCode == Keys.Enter) |
|
1438 |
{ |
|
1439 |
this.radButtonSearch.Focus(); |
|
1440 |
this.radButtonSearch.PerformClick(); |
|
1441 |
} |
|
1442 |
} |
|
1443 |
|
|
1444 |
//private void RadTextBoxDocumentNo_KeyUp(object sender, KeyEventArgs e) |
|
1445 |
//{ |
|
1446 |
// if (sender is RadTextBox txtBox) |
|
1447 |
// { |
|
1448 |
// if (txtBox.Text.Length > 0) |
|
1449 |
// { |
|
1450 |
// txtBox.BackColor = Color.DarkSlateBlue; |
|
1451 |
// txtBox.ForeColor = Color.Yellow; |
|
1452 |
// txtBox.Font = new Font("Segoe UI", 8.25F, FontStyle.Bold); |
|
1453 |
// } |
|
1454 |
// else |
|
1455 |
// { |
|
1456 |
// txtBox.BackColor = Color.White; |
|
1457 |
// txtBox.ForeColor = Color.Black; |
|
1458 |
// txtBox.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular); |
|
1459 |
// } |
|
1460 |
// } |
|
1461 |
//} |
|
1462 |
|
|
1439 | 1463 |
private void RadButtonSearch_Click(object sender, EventArgs e) |
1440 | 1464 |
{ |
1441 | 1465 |
try |
... | ... | |
2195 | 2219 |
{ |
2196 | 2220 |
#region 유효성검사 |
2197 | 2221 |
|
2198 |
#region 필수값 체크(Team, DWG_ID)
|
|
2222 |
#region 필수값 체크(ID2 Project, DWG_ID)
|
|
2199 | 2223 |
|
2200 | 2224 |
if (this.documents.Any(x => string.IsNullOrEmpty(x.RefProjectCode))) |
2201 | 2225 |
{ |
2202 |
RadMessageBox.Show($"Please, check the required value (Team).", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info);
|
|
2226 |
RadMessageBox.Show($"Please, check the required value (ID2 Project).", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info);
|
|
2203 | 2227 |
return; |
2204 | 2228 |
} |
2205 | 2229 |
|
... | ... | |
2584 | 2608 |
|
2585 | 2609 |
if (result.Error != null) |
2586 | 2610 |
{ |
2587 |
RadMessageBox.Show(result.Error, "Information", MessageBoxButtons.OK, RadMessageIcon.Info);
|
|
2611 |
RadMessageBox.Show(result.Error, Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Error);
|
|
2588 | 2612 |
} |
2589 | 2613 |
else |
2590 | 2614 |
{ |
내보내기 Unified diff