개정판 d0e26a00
issue #0000
backgroud page
- 현재 active project가 설정되어있으면 해당 project가 선택되도록 수정
Main Grid
- Document 정보 변경 시 rowfocus가 벗어나지 않아도 정보가 수정되도록 수정
- Index 오류로 일단 DefaultValuesNeeded, UserAddedRow 이벤트 주석처리
- DataBinding 시 viewdata/Total 정보 반영로직 수정
- 체크박스 리스트 조회로직 추가
- 체크박스 클릭 후 DWG Delete > Grid의 Row 삭제되도록 수정(데이터가 많을 경우 속도 체크 필요 현재:65,000건) grid 체크박스 좌측에 고정되도록 수정(스크롤 시 항상 보이도록)
Change-Id: Iac18916bb22325d786f1ae049f1983d4bdabf29a
ID2.Manager/ID2.Manager/Controls/OpenProjectView.cs | ||
---|---|---|
51 | 51 |
this.radGridViewGroup.DataSource = null; |
52 | 52 |
} |
53 | 53 |
this.radGridViewGroup.DataSource = informations.ProjectList.Where(x => x.Level.Equals(1)); |
54 |
|
|
55 |
if (informations.ActiveProject != null) |
|
56 |
{ |
|
57 |
var selectedRow = this.radGridViewGroup.Rows.FirstOrDefault(o => (o.DataBoundItem as ProjectInfo).ProjectID.Equals(informations.ActiveProject.ProjectID)); |
|
58 |
if (selectedRow != null) |
|
59 |
{ |
|
60 |
this.radGridViewGroup.CurrentRow = selectedRow; |
|
61 |
this.radGridViewGroup.CurrentRow.IsSelected = true; |
|
62 |
} |
|
63 |
} |
|
54 | 64 |
} |
55 | 65 |
|
56 | 66 |
private void RadGridViewGroup_SelectionChanged(object sender, EventArgs e) |
... | ... | |
63 | 73 |
if (this.radGridViewGroup.SelectedRows.Count == 0) return; |
64 | 74 |
|
65 | 75 |
var projectGroup = this.radGridViewGroup.SelectedRows[0].DataBoundItem as ProjectInfo; |
66 |
|
|
76 |
|
|
67 | 77 |
this.radGridViewProjects.DataSource = informations.ProjectList.Where(x => x.Level.Equals(2) && x.GroupID.Equals(projectGroup.ProjectID)); |
68 | 78 |
} |
69 | 79 |
|
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
72 | 72 |
|
73 | 73 |
var appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName); |
74 | 74 |
|
75 |
if(!Directory.Exists(appDataPath)) |
|
75 |
if (!Directory.Exists(appDataPath))
|
|
76 | 76 |
{ |
77 | 77 |
Directory.CreateDirectory(appDataPath); |
78 | 78 |
} |
... | ... | |
114 | 114 |
this.radTextBoxDocumentNo.KeyDown += RadTextBoxDocumentNo_KeyDown; |
115 | 115 |
this.radTextBoxDocumentNo.KeyUp += RadTextBoxDocumentNo_KeyUp; |
116 | 116 |
this.radButtonSearch.Click += RadButtonSearch_Click; |
117 |
|
|
118 |
this.radGridViewDocuments.DefaultValuesNeeded += RadGridViewDocuments_DefaultValuesNeeded; |
|
119 |
this.radGridViewDocuments.UserAddedRow += RadGridViewDocuments_UserAddedRow; |
|
117 |
|
|
118 |
//this.radGridViewDocuments.DefaultValuesNeeded += RadGridViewDocuments_DefaultValuesNeeded;
|
|
119 |
//this.radGridViewDocuments.UserAddedRow += RadGridViewDocuments_UserAddedRow;
|
|
120 | 120 |
this.radGridViewDocuments.SelectionChanged += RadGridViewDocuments_SelectionChanged; |
121 | 121 |
this.radGridViewDocuments.ViewCellFormatting += RadGridViewDocuments_ViewCellFormatting; |
122 | 122 |
this.radGridViewDocuments.CreateRowInfo += RadGridViewDocuments_CreateRowInfo; |
123 | 123 |
this.radGridViewDocuments.CellBeginEdit += RadGridViewDocuments_CellBeginEdit; |
124 | 124 |
this.radGridViewDocuments.CommandCellClick += RadGridViewDocuments_CommandCellClick; |
125 | 125 |
this.radGridViewDocuments.MasterView.TableSearchRow.SearchProgressChanged += TableSearchRow_SearchProgressChanged; |
126 |
//this.radGridViewDocuments.FilterChanging += RadGridViewDocuments_FilterChanging; |
|
126 | 127 |
this.radGridViewDocuments.FilterChanged += RadGridViewDocuments_FilterChanged; |
128 |
this.radGridViewDocuments.ValueChanged += RadGridViewDocuments_ValueChanged; |
|
127 | 129 |
|
128 | 130 |
this.radGridViewDocuments.MasterView.TableHeaderRow.MinHeight = 36; |
129 | 131 |
this.radGridViewDocuments.TableElement.RowHeaderColumnWidth = 36; |
... | ... | |
182 | 184 |
} |
183 | 185 |
catch (Exception ex) |
184 | 186 |
{ |
185 |
Program.logger.Error("BriefAndImages_RemoveImage",ex); |
|
187 |
Program.logger.Error("BriefAndImages_RemoveImage", ex);
|
|
186 | 188 |
} |
187 | 189 |
} |
188 | 190 |
|
... | ... | |
248 | 250 |
Program.logger.Error($"dock Layout File load Error. File Path : {dockLayoutPath}", ex); |
249 | 251 |
} |
250 | 252 |
|
251 |
if(!IsUseLayoutLoad) |
|
253 |
if (!IsUseLayoutLoad)
|
|
252 | 254 |
{ |
253 | 255 |
var layout = Properties.Resources.DefalutDockLayout; |
254 | 256 |
|
... | ... | |
267 | 269 |
}); |
268 | 270 |
|
269 | 271 |
this.DockMain.AutoHideWindowDisplaying += DockMain_AutoHideWindowDisplaying; |
270 |
|
|
271 |
this.DockMain.DockStateChanged+=(snd,evt)=>
|
|
272 |
|
|
273 |
this.DockMain.DockStateChanged += (snd, evt) =>
|
|
272 | 274 |
{ |
273 | 275 |
if (evt.DockWindow.Name == DockWindowMain.Name || evt.DockWindow.Name == DockValidation.Name) |
274 | 276 |
{ |
... | ... | |
276 | 278 |
} |
277 | 279 |
|
278 | 280 |
}; |
279 |
|
|
281 |
|
|
280 | 282 |
this.DockMain.DockWindowClosed += (snd, evt) => |
281 | 283 |
{ |
282 |
evt.DockWindow.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide;
|
|
283 |
|
|
284 |
evt.DockWindow.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide; |
|
285 |
|
|
284 | 286 |
//Telerik.WinControls.UI.Docking.AutoHidePosition tabPosition = Telerik.WinControls.UI.Docking.AutoHidePosition.Right; |
285 | 287 |
|
286 | 288 |
|
... | ... | |
303 | 305 |
|
304 | 306 |
// dockWindows.Add(evt.DockWindow); |
305 | 307 |
//} |
306 |
|
|
308 |
|
|
307 | 309 |
|
308 | 310 |
//this.DockMain.AutoHideWindows(dockWindows, tabPosition); |
309 | 311 |
}; |
... | ... | |
336 | 338 |
if (keyData == (Keys.V | Keys.Control)) |
337 | 339 |
{ |
338 | 340 |
System.Diagnostics.Debug.WriteLine("KeyDown CTRL + V"); |
339 |
|
|
340 |
if(Clipboard.ContainsImage()) |
|
341 |
|
|
342 |
if (Clipboard.ContainsImage())
|
|
341 | 343 |
{ |
342 | 344 |
var IsDoftech = true; |
343 | 345 |
var selectReview = true; |
... | ... | |
409 | 411 |
} |
410 | 412 |
|
411 | 413 |
doc.AttFiles.Add(newFile); |
412 |
|
|
414 |
|
|
413 | 415 |
var imageInfo = new AttImageInfo { ID = newFile.FileID, Data = newFile.FileData }; |
414 | 416 |
|
415 | 417 |
switch (category) |
... | ... | |
452 | 454 |
{ |
453 | 455 |
if (e.SearchFinished) |
454 | 456 |
{ |
455 |
|
|
457 |
|
|
456 | 458 |
} |
457 | 459 |
} |
458 | 460 |
|
... | ... | |
542 | 544 |
} |
543 | 545 |
} |
544 | 546 |
|
545 |
#region Init, Load |
|
547 |
#region Init, Load
|
|
546 | 548 |
private void Initialize() |
547 | 549 |
{ |
548 | 550 |
this.Text = Globals.Name; |
... | ... | |
692 | 694 |
InitializeColumns(); |
693 | 695 |
InitializeSearch(); |
694 | 696 |
InitializeGridViewDetail(); |
695 |
|
|
697 |
|
|
696 | 698 |
//this.radGridViewDocuments.DataSource = new BindingList<Documents>(this.documents); |
697 | 699 |
} |
698 | 700 |
|
... | ... | |
725 | 727 |
|
726 | 728 |
private void InitializeSearch() |
727 | 729 |
{ |
728 |
|
|
730 |
|
|
729 | 731 |
var font1 = ThemeResolutionService.GetCustomFont("TelerikWebUI"); |
730 | 732 |
|
731 | 733 |
lbSearch.Text = "\ue13E"; |
... | ... | |
740 | 742 |
|
741 | 743 |
var chkbox1 = new RadCheckBoxElement(); |
742 | 744 |
chkbox1.Text = "Show All Detail"; |
743 |
chkbox1.CheckStateChanged += (snd, evt) =>
|
|
744 |
{
|
|
745 |
radGridViewDocuments.MasterView.ChildRows.ForAll(x=>x.IsExpanded = chkbox1.Checked);
|
|
745 |
chkbox1.CheckStateChanged += (snd, evt) => |
|
746 |
{ |
|
747 |
radGridViewDocuments.MasterView.ChildRows.ForAll(x => x.IsExpanded = chkbox1.Checked);
|
|
746 | 748 |
}; |
747 | 749 |
|
748 | 750 |
btnShowAllDetail.HostedItem = chkbox1; |
... | ... | |
763 | 765 |
|
764 | 766 |
var panel = new StackLayoutElement(); |
765 | 767 |
panel.Orientation = Orientation.Vertical; |
766 |
|
|
768 |
|
|
767 | 769 |
var btnComboColumns = new RadCheckedDropDownListElement(); |
768 | 770 |
btnComboColumns.ShowCheckAllItems = true; |
769 | 771 |
btnComboColumns.CheckAllItem.Checked = true; |
... | ... | |
853 | 855 |
row.Cells["TEXT"].Value = makrup.TEXT; |
854 | 856 |
e.SourceCollection.Add(row); |
855 | 857 |
} |
856 |
|
|
858 |
|
|
857 | 859 |
e.Template.BestFitColumns(BestFitColumnMode.AllCells); |
858 | 860 |
} |
859 | 861 |
} |
... | ... | |
867 | 869 |
} |
868 | 870 |
} |
869 | 871 |
|
870 |
#endregion |
|
872 |
#endregion
|
|
871 | 873 |
|
872 | 874 |
private void OpenProjectView_OpenProjectClick(object sender, EventArgs e) |
873 | 875 |
{ |
... | ... | |
879 | 881 |
{ |
880 | 882 |
this.radRibbonBarBackstageViewID2Manager.SelectedItem = this.backstageTabItemOpenProject; |
881 | 883 |
|
882 |
foreach ( Control ctrl in this.backstageViewPageOpenProject.Controls)
|
|
884 |
foreach (Control ctrl in this.backstageViewPageOpenProject.Controls) |
|
883 | 885 |
{ |
884 | 886 |
if (ctrl is OpenProjectView) |
885 | 887 |
{ |
... | ... | |
974 | 976 |
|
975 | 977 |
//도면번호 조회조건 |
976 | 978 |
this.radTextBoxDocumentNo.Text = string.Empty; |
977 |
#endregion |
|
979 |
#endregion
|
|
978 | 980 |
|
979 |
#region 검토 |
|
981 |
#region 검토
|
|
980 | 982 |
//문의(DOF) |
981 | 983 |
if (this.radDropDownListToIsDiscussion.Items.Count > 0) |
982 | 984 |
this.radDropDownListToIsDiscussion.Items.Clear(); |
983 | 985 |
informations.IsYesNo.ForEach(x => |
984 |
{ |
|
985 |
this.radDropDownListToIsDiscussion.Items.Add(new RadListDataItem(x, x)); |
|
986 |
}); |
|
986 |
{
|
|
987 |
this.radDropDownListToIsDiscussion.Items.Add(new RadListDataItem(x, x));
|
|
988 |
});
|
|
987 | 989 |
var allToIsDiscussion = new RadListDataItem("== 전체 ==", string.Empty); |
988 | 990 |
this.radDropDownListToIsDiscussion.Items.Insert(0, allToIsDiscussion); |
989 | 991 |
allToIsDiscussion.Selected = true; |
... | ... | |
1077 | 1079 |
var allClientIsResult = new RadListDataItem("== 전체 ==", string.Empty); |
1078 | 1080 |
this.radDropDownListClientIsResult.Items.Insert(0, allClientIsResult); |
1079 | 1081 |
allClientIsResult.Selected = true; |
1080 |
#endregion |
|
1082 |
#endregion
|
|
1081 | 1083 |
|
1082 |
#region AVEVA |
|
1084 |
#region AVEVA
|
|
1083 | 1085 |
//Gateway |
1084 | 1086 |
if (this.radDropDownListGateway.Items.Count > 0) |
1085 | 1087 |
this.radDropDownListGateway.Items.Clear(); |
... | ... | |
1101 | 1103 |
var allDTIsRegSystem = new RadListDataItem("== 전체 ==", string.Empty); |
1102 | 1104 |
this.radDropDownListRegistration.Items.Insert(0, allDTIsRegSystem); |
1103 | 1105 |
allDTIsRegSystem.Selected = true; |
1104 |
#endregion |
|
1106 |
#endregion
|
|
1105 | 1107 |
|
1106 | 1108 |
this.GetDocList(); |
1107 | 1109 |
} |
... | ... | |
1118 | 1120 |
|
1119 | 1121 |
} |
1120 | 1122 |
|
1121 |
#region Document List 조회 |
|
1123 |
#region Document List 조회
|
|
1122 | 1124 |
public void GetDocList() |
1123 | 1125 |
{ |
1124 | 1126 |
try |
... | ... | |
1258 | 1260 |
|
1259 | 1261 |
this.radGridViewDocuments.FilterDescriptors.Clear(); |
1260 | 1262 |
this.radGridViewDocuments.DataSource = new BindingList<Documents>(this.documents); |
1261 |
this.lbSelectAndTotal.Text = $"{this.documents.Count} / {this.TotalCount} (Selected / Total)";
|
|
1263 |
this.lbSelectAndTotal.Text = $"{this.radGridViewDocuments.MasterTemplate.DataView.Count} / {this.TotalCount} (Selected / Total)";
|
|
1262 | 1264 |
|
1263 | 1265 |
var verification = this.LayoutValidation.Controls[0] as Verification; |
1264 | 1266 |
verification.DocumentListBinding(this.documents); |
... | ... | |
1309 | 1311 |
{ |
1310 | 1312 |
if (checkBox.Tag != null) |
1311 | 1313 |
{ |
1312 |
ColumnGroupsViewDefinition columnGroupsView = this.radGridViewDocuments.MasterTemplate.ViewDefinition as ColumnGroupsViewDefinition;
|
|
1314 |
ColumnGroupsViewDefinition columnGroupsView = this.radGridViewDocuments.MasterTemplate.ViewDefinition as ColumnGroupsViewDefinition; |
|
1313 | 1315 |
GridViewColumnGroup colGroup = columnGroupsView.GetAllGroups().Where(x => x.Name.Equals(checkBox.Tag.ToString())).FirstOrDefault(); |
1314 | 1316 |
if (colGroup != null) |
1315 | 1317 |
colGroup.IsVisible = checkBox.Checked; |
... | ... | |
1401 | 1403 |
{ |
1402 | 1404 |
if (frm.ShowDialog(this) == DialogResult.OK) |
1403 | 1405 |
{ |
1404 |
|
|
1406 |
|
|
1405 | 1407 |
} |
1406 | 1408 |
} |
1407 | 1409 |
} |
... | ... | |
1410 | 1412 |
{ |
1411 | 1413 |
Application.Exit(); |
1412 | 1414 |
} |
1413 |
#endregion |
|
1415 |
#endregion
|
|
1414 | 1416 |
|
1415 |
#region Grid event |
|
1417 |
#region Grid event
|
|
1416 | 1418 |
private void RadGridViewDocuments_CommandCellClick(object sender, GridViewCellEventArgs e) |
1417 | 1419 |
{ |
1418 | 1420 |
if (e.Row is GridViewNewRowInfo) |
1419 | 1421 |
{ |
1420 |
|
|
1422 |
|
|
1421 | 1423 |
} |
1422 | 1424 |
else |
1423 | 1425 |
{ |
... | ... | |
1560 | 1562 |
{ |
1561 | 1563 |
if (e.CellElement is GridRowHeaderCellElement) |
1562 | 1564 |
{ |
1563 |
// if (e.CellElement.RowIndex > -1) |
|
1564 |
// e.CellElement.Text = (e.CellElement.RowIndex + 1).ToString(); |
|
1565 |
// if (e.CellElement.RowIndex > -1)
|
|
1566 |
// e.CellElement.Text = (e.CellElement.RowIndex + 1).ToString();
|
|
1565 | 1567 |
} |
1566 | 1568 |
else if (e.CellElement is GridGroupExpanderCellElement expanderCellElement) |
1567 | 1569 |
{ |
1568 |
if((e.Row.DataBoundItem as Documents).Markups == null) |
|
1570 |
if ((e.Row.DataBoundItem as Documents).Markups == null)
|
|
1569 | 1571 |
{ |
1570 | 1572 |
expanderCellElement.Enabled = false; |
1571 | 1573 |
} |
... | ... | |
1623 | 1625 |
} |
1624 | 1626 |
} |
1625 | 1627 |
} |
1626 |
else if(e.Row is GridViewDetailsRowInfo) |
|
1628 |
else if (e.Row is GridViewDetailsRowInfo)
|
|
1627 | 1629 |
{ |
1628 | 1630 |
if (e.CellElement is GridDetailViewCellElement detailViewCellElement) |
1629 | 1631 |
{ |
1630 |
detailViewCellElement.Padding = new Padding(10,2,2,2);
|
|
1632 |
detailViewCellElement.Padding = new Padding(10, 2, 2, 2);
|
|
1631 | 1633 |
detailViewCellElement.BackColor = Color.FromArgb(214, 214, 214); |
1632 | 1634 |
detailViewCellElement.BackColor2 = Color.FromArgb(214, 214, 214); |
1633 | 1635 |
} |
... | ... | |
1705 | 1707 |
return btnElem; |
1706 | 1708 |
} |
1707 | 1709 |
|
1710 |
private void RadGridViewDocuments_FilterChanging(object sender, GridViewCollectionChangingEventArgs e) |
|
1711 |
{ |
|
1712 |
|
|
1713 |
} |
|
1714 |
|
|
1708 | 1715 |
private void RadGridViewDocuments_FilterChanged(object sender, GridViewCollectionChangedEventArgs e) |
1709 | 1716 |
{ |
1717 |
//if (sender is RadGridView grid) |
|
1718 |
//{ |
|
1719 |
// var viewRows = e.GridViewTemplate.DataView; |
|
1720 |
|
|
1721 |
// grid.Rows.ForAll(x => x.Cells["Checked"].Value = false); |
|
1722 |
|
|
1723 |
// viewRows.ForAll(x => |
|
1724 |
// { |
|
1725 |
// bool isChecked = Convert.ToBoolean(x.Cells["Checked"].Value); |
|
1726 |
// x.Cells["Checked"].Value = isChecked; |
|
1727 |
// if (x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value)) |
|
1728 |
// { |
|
1729 |
// x.Cells["Checked"].Value = false; |
|
1730 |
// } |
|
1731 |
// }); |
|
1732 |
//} |
|
1733 |
|
|
1734 |
//this.radGridViewDocuments.Rows.ToList().Except(e.GridViewTemplate.DataView).Count() |
|
1735 |
|
|
1736 |
//var datas = this.radGridViewDocuments.MasterTemplate.DataView.Except(e.GridViewTemplate.DataView); |
|
1737 |
//datas.ForAll(x => x.Cells["Checked"].Value = false); |
|
1738 |
|
|
1739 |
//if (e.Action == NotifyCollectionChangedAction.Remove) |
|
1740 |
//{ |
|
1741 |
// if (sender is RadGridView grid) |
|
1742 |
// { |
|
1743 |
// var allRows = grid.Rows.ToList(); |
|
1744 |
// var viewRows = e.GridViewTemplate.DataView; |
|
1745 |
// var hiddenRows = allRows.Except(viewRows); |
|
1746 |
|
|
1747 |
// //grid.BeginUpdate(); |
|
1748 |
// hiddenRows.ForAll(x => |
|
1749 |
// { |
|
1750 |
// if (x.Cells["Checked"].Value != null) |
|
1751 |
// { |
|
1752 |
// if (Convert.ToBoolean(x.Cells["Checked"].Value)) |
|
1753 |
// { |
|
1754 |
// x.Cells["Checked"].Value = false; |
|
1755 |
// } |
|
1756 |
// } |
|
1757 |
// }); |
|
1758 |
// //grid.EndUpdate(); |
|
1759 |
// } |
|
1760 |
//} |
|
1761 |
|
|
1710 | 1762 |
this.lbSelectAndTotal.Text = $"{e.GridViewTemplate.DataView.Count} / {this.TotalCount} (Selected / Total)"; |
1711 | 1763 |
} |
1712 |
#endregion |
|
1713 | 1764 |
|
1714 |
#region Excel |
|
1765 |
private void RadGridViewDocuments_ValueChanged(object sender, EventArgs e) |
|
1766 |
{ |
|
1767 |
this.radGridViewDocuments.EndEdit(); |
|
1768 |
} |
|
1769 |
#endregion |
|
1770 |
|
|
1771 |
#region Excel |
|
1715 | 1772 |
private UserInfo GetUser(string user) |
1716 | 1773 |
{ |
1717 | 1774 |
UserInfo userInfo = informations.UserList.Where(x => x.ID.Equals(user)).FirstOrDefault(); |
... | ... | |
1736 | 1793 |
|
1737 | 1794 |
private void RadButtonElementExcelImport_Click(object sender, EventArgs e) |
1738 | 1795 |
{ |
1739 |
var form = new Forms.SelectExcelData();
|
|
1796 |
var form = new Forms.SelectExcelData(); |
|
1740 | 1797 |
|
1741 | 1798 |
var dialogResult = form.ShowDialog(); |
1742 | 1799 |
|
... | ... | |
1778 | 1835 |
//Error Message |
1779 | 1836 |
StringBuilder sbErrMsg = new StringBuilder(); |
1780 | 1837 |
|
1781 |
using(ID2Excel excel = new ID2Excel()) |
|
1838 |
using (ID2Excel excel = new ID2Excel())
|
|
1782 | 1839 |
{ |
1783 |
var result = excel.GemboxImport(ofd.FileName); |
|
1840 |
var result = excel.GemboxImport(ofd.FileName);
|
|
1784 | 1841 |
|
1785 |
if(result.Error != null) |
|
1842 |
if (result.Error != null)
|
|
1786 | 1843 |
{ |
1787 | 1844 |
|
1788 | 1845 |
RadMessageBox.Show(result.Error, "Information", MessageBoxButtons.OK, RadMessageIcon.Info); |
... | ... | |
1960 | 2017 |
} |
1961 | 2018 |
#endregion |
1962 | 2019 |
|
2020 |
/* |
|
1963 | 2021 |
private void GetCheckedList() |
1964 | 2022 |
{ |
1965 | 2023 |
RadGridView grid = this.radGridViewDocuments; |
1966 | 2024 |
|
1967 |
//grid. |
|
2025 |
//var checkers = grid.Rows.Where(x => |
|
2026 |
//{ |
|
2027 |
// return x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value); |
|
2028 |
//}).Select(x => x.DataBoundItem as Documents).ToList(); |
|
2029 |
|
|
2030 |
//var viewRows = new Queue<GridViewRowInfo>(this.radGridViewDocuments.MasterTemplate.DataView.Where(x => x.Cells["spq"); |
|
2031 |
var viewRows = grid.MasterTemplate.DataView; |
|
2032 |
|
|
2033 |
var checkers = viewRows.Where(x => |
|
2034 |
{ |
|
2035 |
return x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value); |
|
2036 |
}).ToList(); |
|
2037 |
|
|
2038 |
var rows = new GridViewDataRowInfo[checkers.Count]; |
|
2039 |
checkers.CopyTo(rows, 0); |
|
2040 |
|
|
2041 |
if (rows.Length > 0) |
|
2042 |
{ |
|
2043 |
grid.BeginUpdate(); |
|
2044 |
|
|
2045 |
int nLoop = 0; |
|
2046 |
rows.ForAll(x => |
|
2047 |
{ |
|
2048 |
grid.Rows.Remove(rows[nLoop]); |
|
2049 |
nLoop++; |
|
2050 |
}); |
|
2051 |
|
|
2052 |
grid.EndUpdate(); |
|
2053 |
} |
|
2054 |
|
|
2055 |
|
|
2056 |
//grid.Rows.re grid.Rows.ToList().Intersect(checkers) |
|
2057 |
|
|
2058 |
|
|
2059 |
//RadMessageBox.Show($"{checkers.Count()}", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2060 |
//RadMessageBox.Show($"{this.documents.Count}", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2061 |
this.lbSelectAndTotal.Text = $"{grid.MasterTemplate.DataView.Count} / {this.TotalCount} (Selected / Total)"; |
|
2062 |
} |
|
2063 |
*/ |
|
2064 |
private IEnumerable<GridViewRowInfo> GetCheckedList() |
|
2065 |
{ |
|
2066 |
try |
|
2067 |
{ |
|
2068 |
RadGridView grid = this.radGridViewDocuments; |
|
2069 |
var viewRows = grid.MasterTemplate.DataView; |
|
2070 |
return viewRows.Where(x => |
|
2071 |
{ |
|
2072 |
return x.Cells["Checked"].Value != null && Convert.ToBoolean(x.Cells["Checked"].Value); |
|
2073 |
}); |
|
2074 |
} |
|
2075 |
catch (Exception ex) |
|
2076 |
{ |
|
2077 |
throw ex; |
|
2078 |
} |
|
1968 | 2079 |
} |
1969 | 2080 |
|
1970 | 2081 |
private void RadButtonElementDelete_Click(object sender, EventArgs e) |
1971 | 2082 |
{ |
1972 |
RadMessageBox.Show("삭제 진행", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2083 |
//RadMessageBox.Show("삭제 진행", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2084 |
|
|
2085 |
RadGridView grid = this.radGridViewDocuments; |
|
2086 |
List<GridViewRowInfo> checkList = null; |
|
2087 |
|
|
2088 |
try |
|
2089 |
{ |
|
2090 |
checkList = new List<GridViewRowInfo>(this.GetCheckedList()); |
|
2091 |
|
|
2092 |
if (checkList.Count > 0) |
|
2093 |
{ |
|
2094 |
if (RadMessageBox.Show("Do you want to Delete?", Globals.Name, MessageBoxButtons.YesNo, RadMessageIcon.Question) == DialogResult.Yes) |
|
2095 |
{ |
|
2096 |
var delData = new GridViewDataRowInfo[checkList.Count]; |
|
2097 |
checkList.CopyTo(delData, 0); |
|
2098 |
|
|
2099 |
if (delData.Length > 0) |
|
2100 |
{ |
|
2101 |
grid.BeginUpdate(); |
|
2102 |
int nLoop = 0; |
|
2103 |
delData.ForAll(x => { grid.Rows.Remove(delData[nLoop]); nLoop++; }); |
|
2104 |
grid.EndUpdate(); |
|
2105 |
|
|
2106 |
RadMessageBox.Show("Delete is complete", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2107 |
|
|
2108 |
this.DocumentListBinding(); |
|
2109 |
} |
|
2110 |
} |
|
2111 |
} |
|
2112 |
else |
|
2113 |
{ |
|
2114 |
RadMessageBox.Show("Please check the DWG.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Info); |
|
2115 |
} |
|
2116 |
} |
|
2117 |
catch (Exception ex) |
|
2118 |
{ |
|
2119 |
Program.logger.Error($"An exception occurred from {MethodBase.GetCurrentMethod().Name}", ex); |
|
2120 |
RadMessageBox.Show("DWG delete failed.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Error); |
|
2121 |
} |
|
1973 | 2122 |
} |
1974 | 2123 |
|
1975 | 2124 |
#region Save event |
... | ... | |
2025 | 2174 |
result = (bool)e.Result; |
2026 | 2175 |
if (result) |
2027 | 2176 |
{ |
2028 |
markusResult = new MarkusInfoController().SetProperties(Program.informations.ProjectList.Where(x => x.Level == 2).Select(x=>x.Name));
|
|
2177 |
markusResult = new MarkusInfoController().SetProperties(Program.informations.ProjectList.Where(x => x.Level == 2).Select(x => x.Name));
|
|
2029 | 2178 |
markusResult = new MarkusInfoController().SetMarkusInfo(this.documents); |
2030 | 2179 |
markusMembersResult = new MarkusInfoController().SetMembers(informations.UserList); |
2031 | 2180 |
//informations.ProjectList.Where(x => x.Level.Equals(2)); <- ID2 Manager에 저장 된 전체 프로젝트 리스트 |
... | ... | |
2235 | 2384 |
//Filter = "PDF files (*.pdf)|*.pdf|All files (*.*)|*.*", |
2236 | 2385 |
Filter = "All Images Files (*.png;*.jpeg;*.gif;*.jpg;*.bmp)|*.png;*.jpeg;*.gif;*.jpg;*.bmp" |
2237 | 2386 |
+ "|PNG Portable Network Graphics (*.png)|*.png" |
2238 |
+"|JPEG File Interchange Format (*.jpg *.jpeg *jfif)|*.jpg;*.jpeg;*.jfif" |
|
2387 |
+ "|JPEG File Interchange Format (*.jpg *.jpeg *jfif)|*.jpg;*.jpeg;*.jfif"
|
|
2239 | 2388 |
+ "|BMP Windows Bitmap (*.bmp)|*.bmp" |
2240 | 2389 |
+ "|GIF Graphics Interchange Format (*.gif)|*.gif", |
2241 |
//Title = "Open an Excel File", |
|
2242 |
RestoreDirectory = true |
|
2390 |
//Title = "Open an Excel File",
|
|
2391 |
RestoreDirectory = true
|
|
2243 | 2392 |
}) |
2244 | 2393 |
{ |
2245 | 2394 |
try |
... | ... | |
2323 | 2472 |
RadMessageBox.Show("Failed to reload the project.", Globals.Name, MessageBoxButtons.OK, RadMessageIcon.Error); |
2324 | 2473 |
} |
2325 | 2474 |
} |
2326 |
#endregion |
|
2475 |
#endregion
|
|
2327 | 2476 |
|
2328 |
#region ColumnGroup |
|
2477 |
#region ColumnGroup
|
|
2329 | 2478 |
private void InitColumnGroupsViewDefinition(RadGridView gridView) |
2330 | 2479 |
{ |
2331 | 2480 |
ColumnGroupsViewDefinition columnGroupsView = new ColumnGroupsViewDefinition(); |
... | ... | |
2343 | 2492 |
List<string> dtColNames = new List<string>() { "DTIsGateWay", "DTIsImport", "DTIsRegSystem", "DTRemarks" }; |
2344 | 2493 |
|
2345 | 2494 |
//체크 |
2346 |
GridViewColumnGroup chkColGrp = new GridViewColumnGroup("");
|
|
2495 |
GridViewColumnGroup chkColGrp = new GridViewColumnGroup("√") { IsPinned = true };
|
|
2347 | 2496 |
GridViewColumnGroupRow chkColGrpRow = new GridViewColumnGroupRow(); |
2348 | 2497 |
chkColGrpRow.ColumnNames.AddRange(chkColNames); |
2349 | 2498 |
chkColGrp.Rows.Add(chkColGrpRow); |
... | ... | |
2433 | 2582 |
|
2434 | 2583 |
gridView.MasterTemplate.ViewDefinition = columnGroupsView; |
2435 | 2584 |
} |
2436 |
#endregion |
|
2585 |
#endregion
|
|
2437 | 2586 |
|
2438 | 2587 |
private void txtFullSearch_TextChanged(object sender, EventArgs e) |
2439 | 2588 |
{ |
2440 |
if(string.IsNullOrWhiteSpace(txtFullSearch.Text)) |
|
2589 |
if (string.IsNullOrWhiteSpace(txtFullSearch.Text))
|
|
2441 | 2590 |
radGridViewDocuments.MasterTemplate.Refresh(null); |
2442 | 2591 |
|
2443 | 2592 |
txtFullSearch.TextBoxElement.ShowClearButton = !string.IsNullOrWhiteSpace(txtFullSearch.Text); |
... | ... | |
2456 | 2605 |
|
2457 | 2606 |
private void txtFullSearch_KeyDown(object sender, KeyEventArgs e) |
2458 | 2607 |
{ |
2459 |
if(e.KeyCode == Keys.Enter) |
|
2608 |
if (e.KeyCode == Keys.Enter)
|
|
2460 | 2609 |
{ |
2461 | 2610 |
radGridViewDocuments.MasterView.TableSearchRow.SelectNextSearchResult(); |
2462 | 2611 |
} |
내보내기 Unified diff