Presentation is loading. Please wait.

Presentation is loading. Please wait.

' Strategic Alliance Partner with '

Similar presentations


Presentation on theme: "' Strategic Alliance Partner with '"— Presentation transcript:

1 ' Strategic Alliance Partner with '
UNIERP V5 Grid Event 가이드 ' Strategic Alliance Partner with ' Copyright ⓒ 2008 Samsung SDS Co., Ltd. All rights reserved | Confidential

2 목 차 개요 AfterCellUpdate BeforePopup AfterPopup

3 개요 uniGrid의 자주 쓰이는 이벤트인 AfterCellupdate , BeforePopup , AfterPopup을 설명합니다. 3

4 AfterCellUpdate 4

5 AfterCellupdate private void uniGrid1_AfterCellUpdate(object sender, CellEventArgs e) { if (e.Cell.Value != null) e.Cell.Row.Cells["대상"].Value = Convert.ToInt32(e.Cell.Value) * 10; } 셀의 값이 변경 처리되면 호출되는 이벤트입니다. 주로 수량이나 단가 등이 변경되는 경우 계산 처리된 값이 다른 셀에 반영이 필요한 경우에 주로 사용됩니다. 5

6 BeforePopup 6

7 BeforePopup 7 예) uniERP.App.UI.SD.S1112MA2
private void uniGrid1_BeforePopupOpen(object sender, uniERP.AppFramework.UI.Controls.Popup.BeforePopupOpenEventArgs e) { if (!uniGrid1.ActiveCell.IsInEditMode) e.Cancel = true; return; } string columnName = uniGrid1.ActiveCell.Column.Key; string icodeValue = uniGrid1.ActiveCell.Value.ToString(); string ipopupWinTitle = string.Empty; string iconditionCaption = string.Empty; string iSQLFromStatements = string.Empty; string iSQLWhereStatements = string.Empty; string iGridCellCode1 = string.Empty; string iGridCellCode2 = string.Empty; string iGridCellCaption1 = "Free Add. Type"; string iGridCellCaption2 = "Free Add. Type Description"; 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 7

8 BeforePopup 8 switch (columnName) { case "bp_cd":
ipopupWinTitle = "Customer"; iconditionCaption = "Customer"; iSQLFromStatements = "B_BIZ_PARTNER(NOLOCK)"; iSQLWhereStatements = "BP_TYPE in ('C','CS')"; iGridCellCode1 = "BP_CD"; iGridCellCode2 = "BP_NM"; iGridCellCaption1 = "Customer"; iGridCellCaption2 = "Customer Name"; break; case "item_cd": e.PopupPassData.PopupWinTitle = "Item"; e.PopupPassData.ConditionCaption = "Item"; e.PopupPassData.SQLFromStatements = "b_item(NOLOCK)"; e.PopupPassData.SQLWhereStatements = ""; e.PopupPassData.SQLWhereInputCodeValue = popconItem_cd.CodeValue; e.PopupPassData.SQLWhereInputNameValue = ""; e.PopupPassData.DistinctOrNot = false; e.PopupPassData.GridCellCode = new String[4]; e.PopupPassData.GridCellCaption = new String[4]; e.PopupPassData.GridCellType = new enumDef.GridCellType[4]; e.PopupPassData.GridCellLength = new Int32[4]; 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 8

9 BeforePopup 9 e.PopupPassData.GridCellCode[0] = "item_cd";
e.PopupPassData.GridCellCode[1] = "item_nm"; e.PopupPassData.GridCellCode[2] = "spec"; e.PopupPassData.GridCellCode[3] = "Basic_Unit"; e.PopupPassData.GridCellCaption[0] = "Item"; e.PopupPassData.GridCellCaption[1] = "Item Desc."; e.PopupPassData.GridCellCaption[2] = "Specification"; e.PopupPassData.GridCellCaption[3] = "Unit"; e.PopupPassData.GridCellType[0] = enumDef.GridCellType.Edit; e.PopupPassData.GridCellType[1] = enumDef.GridCellType.Edit; e.PopupPassData.GridCellType[2] = enumDef.GridCellType.Edit; e.PopupPassData.GridCellType[3] = enumDef.GridCellType.Edit; return; default: e.Cancel = true; break; } //END SWITCH 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 9

10 BeforePopup 10 e.PopupPassData.PopupWinTitle = ipopupWinTitle;
e.PopupPassData.ConditionCaption = iconditionCaption; e.PopupPassData.SQLFromStatements = iSQLFromStatements; e.PopupPassData.SQLWhereStatements = iSQLWhereStatements; e.PopupPassData.SQLWhereInputCodeValue = icodeValue; e.PopupPassData.SQLWhereInputNameValue = ""; e.PopupPassData.DistinctOrNot = true; e.PopupPassData.GridCellCode = new String[2]; e.PopupPassData.GridCellCaption = new String[2]; e.PopupPassData.GridCellType = new enumDef.GridCellType[2]; e.PopupPassData.GridCellLength = new Int32[2]; e.PopupPassData.GridCellCode[0] = iGridCellCode1; e.PopupPassData.GridCellCode[1] = iGridCellCode2; e.PopupPassData.GridCellCaption[0] = iGridCellCaption1; e.PopupPassData.GridCellCaption[1] = iGridCellCaption2; e.PopupPassData.GridCellType[0] = enumDef.GridCellType.Edit; e.PopupPassData.GridCellType[1] = enumDef.GridCellType.Edit; } // END EVNET 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 10

11 AfterPopup 11

12 AfterPopup 12 예) uniERP.App.UI.SD.S1112MA2
private void uniGrid1_AfterPopupClosed(object sender, uniERP.AppFramework.UI.Controls.Popup.AfterPopupCloseEventArgs e) { DataSet iDataSet = new DataSet(); if (e.ResultData.Data == null) return; iDataSet = (DataSet)e.ResultData.Data; string columnName = uniGrid1.ActiveCell.Column.Key; string columnNameForName = string.Empty; string iGridCellCode1 = string.Empty; string iGridCellCode2 = string.Empty; 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 12

13 AfterPopup 13 switch (columnName) { case "bp_cd":
columnNameForName = "bp_nm"; iGridCellCode1 = "BP_CD"; iGridCellCode2 = "BP_NM"; break; case "sales_unit": iGridCellCode1 = "UNIT"; case "item_cd": uniGrid1.ActiveRow.Cells[columnName].Value = iDataSet.Tables[0].Rows[0]["item_cd"].ToString(); uniGrid1.ActiveRow.Cells["item_nm"].Value = iDataSet.Tables[0].Rows[0]["item_nm"].ToString(); uniGrid1.ActiveRow.Cells["item_spce"].Value = iDataSet.Tables[0].Rows[0]["spec"].ToString(); uniGrid1.ActiveRow.Cells["sales_unit"].Value = iDataSet.Tables[0].Rows[0]["Basic_Unit"].ToString(); return; default: } uniGrid1.ActiveRow.Cells[columnName].Value = iDataSet.Tables[0].Rows[0][iGridCellCode1].ToString(); if ( !columnNameForName.Equals(string.Empty)) uniGrid1.ActiveRow.Cells[columnNameForName].Value = iDataSet.Tables[0].Rows[0][iGridCellCode2].ToString(); 팝업 설정법 Grid의 경우 한 이벤트에 여러 팝업을 처리해야 합니다. 이런 경우 Switch문을 이용하여 각 팝업 별 처리를 합니다. 13

14 감사 합니다. Slogan 14 대표전화: +82-2-6484-1433 E-mail: unierp@samsung.com
Copyright ⓒ 2008 Samsung SDS Co., Ltd. All rights reserved | Confidential 대표전화: 상기 문서에 대한 저작권을 포함한 지적재산권은 삼성SDS(주)에게 있으며, 삼성SDS(주)의 기밀정보 및 영업비밀을 포함하고 있습니다. 본 문서를 제공된 목적 외에 다른 목적으로 사용, 복사, 공개, 배포하는 것은 삼성SDS(주)의 영업비밀 및 지적재산권 침해가 되므로 엄격히 금지합니다. 14


Download ppt "' Strategic Alliance Partner with '"

Similar presentations


Ads by Google