本文整理汇总了C#中SAPbouiCOM.Grid.GetDataTableRowIndex方法的典型用法代码示例。如果您正苦于以下问题:C# Grid.GetDataTableRowIndex方法的具体用法?C# Grid.GetDataTableRowIndex怎么用?C# Grid.GetDataTableRowIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SAPbouiCOM.Grid
的用法示例。
在下文中一共展示了Grid.GetDataTableRowIndex方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BeforeCancel_ValidationCheck
/// <summary>
/// 청구 실행전 실행 가능여부 체크
/// </summary>
/// <param name="oForm"></param>
/// <returns></returns>
private bool BeforeCancel_ValidationCheck(SAPbouiCOM.Form oForm)
{
bool rtnValue = false;
string strValue = string.Empty;
string strDocEntry = string.Empty;
string strPaperTp = string.Empty;
try
{
oGrid = oForm.Items.Item("grd").Specific;
if (oGrid.Rows.SelectedRows.Count > 0)
{
int idx = oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(0, BoOrderType.ot_SelectionOrder));
strDocEntry = FN.GetGridCellValue(ref oGrid, "DocEntry", idx);
strValue = FN.GetRecordsetValue(string.Format(" SELECT COUNT(1) FROM [@KIS_SO01402_HRD] WHERE DocEntry = {0} ", strDocEntry));
if (strValue.CompareTo("0") > 0)
{
B1Connections.theAppl.StatusBar.SetText("청구조정 및 수납관련 데이터가 존재 합니다.", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
rtnValue = false;
}
else
{
rtnValue = true;
}
}
}
catch (Exception)
{
throw;
}
return rtnValue;
}
示例2: ET_grd1_BFClick
public virtual bool ET_grd1_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.ColUID == "U_CHK")
{
#region U_CHK 클릭시 기능 구현
if (pVal.Row >= 0)
{
oForm.Freeze(true);
try
{
#region 문서단위 그룹선택 기능구현
int iRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
string U_CHK = oGrid.DataTable.GetValue("U_CHK", iRowIndex).ToString().Trim();
if (U_CHK == "N")
{
oGrid.DataTable.SetValue("U_CHK", iRowIndex, "Y");
if (oGrid.Rows.IsSelected(pVal.Row) == false)
{
oGrid.Rows.SelectedRows.Add(pVal.Row);
}
}
else
{
oGrid.DataTable.SetValue("U_CHK", iRowIndex, "N");
if (oGrid.Rows.IsSelected(pVal.Row))
{
oGrid.Rows.SelectedRows.Remove(pVal.Row);
}
}
#endregion
}
catch (Exception)
{
throw;
}
finally
{
SetGridCalc_Sum();
oForm.Freeze(false);
}
return false;
}
else
{
//전체선택
SetGridColumn_CheckBox_SelectAll(ref oGrid, "U_CHK");
SetGridCalc_Sum();
return false;
}
#endregion
}// end (pVal.ColUID == "U_CHK")
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例3: BeforeCancel_ValidationCheck
/// <summary>
/// CMS신청 취소 실행 전 실행 가능여부 체크
/// </summary>
/// <param name="oForm"></param>
/// <returns></returns>
private bool BeforeCancel_ValidationCheck(SAPbouiCOM.Form oForm)
{
bool rtnValue = false;
string pDocEntry = string.Empty;
try
{
oGrid = oForm.Items.Item("grd").Specific;
if (oGrid.Rows.SelectedRows.Count == 0)
return rtnValue;
int idx = oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(0, BoOrderType.ot_SelectionOrder));
pDocEntry = FN.GetGridCellValue(ref oGrid, "DocEntry", idx);
if (string.IsNullOrEmpty(pDocEntry))
{
B1Connections.theAppl.StatusBar.SetText("선택한 자료가 존재하지 않습니다.", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
rtnValue = false;
}
else
rtnValue = true;
}
catch (Exception)
{
throw;
}
return rtnValue;
}
示例4: ET_grd1_AFChooseFromList
public virtual void ET_grd1_AFChooseFromList(ItemEvent pVal) {
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
try
{
if (oDataTable != null)
{
SAPbouiCOM.ChooseFromList oCFL = oForm.ChooseFromLists.Item(oCFLEvento.ChooseFromListUID); ;
int iRowindex = oGrid.GetDataTableRowIndex(pVal.Row);
switch (pVal.ColUID)
{
case "U_SHORTNM":
int U_ACCTCD_INDEX = FN.GetColumnIndex(oGrid, "U_ACCTCD") + 1;
if (oCFL.ObjectType == ((int)BoObjectTypes.oBusinessPartners).ToString())
{
oGrid.DataTable.SetValue(pVal.ColUID, iRowindex, oDataTable.GetValue("CardCode", 0));
oGrid.DataTable.SetValue("U_ACCTCD", iRowindex, oDataTable.GetValue("DebPayAcct", 0));
if (oGrid.CommonSetting.GetCellEditable(pVal.Row+1, U_ACCTCD_INDEX)==false)
{
oGrid.CommonSetting.SetCellEditable(pVal.Row+1, U_ACCTCD_INDEX, true);
}
//#region GL계정 ChooseFromList 설정
//SAPbouiCOM.EditTextColumn oColumn = (SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_SHORTNM");
//oColumn.ChooseFromListUID = "grd1.U_SHORTNM";
//oColumn.ChooseFromListAlias = "AcctCode";
//#endregion
}
else
{
oGrid.DataTable.SetValue(pVal.ColUID, iRowindex, oDataTable.GetValue("AcctCode", 0));
oGrid.DataTable.SetValue("U_ACCTCD", iRowindex, oDataTable.GetValue("AcctCode", 0));
if (oGrid.CommonSetting.GetCellEditable(pVal.Row + 1, U_ACCTCD_INDEX))
{
oGrid.CommonSetting.SetCellEditable(pVal.Row + 1, U_ACCTCD_INDEX, false);
}
}
break;
case"U_ACCTCD":
oGrid.DataTable.SetValue(pVal.ColUID, iRowindex, oDataTable.GetValue("AcctCode", 0));
break;
case "U_PRCCD":
oGrid.DataTable.SetValue(pVal.ColUID, iRowindex, oDataTable.GetValue("PrcCode", 0));
break;
default:
break;
}
if (oGrid.Rows.IsSelected(pVal.Row) == false)
{
string U_CHK = oGrid.DataTable.GetValue("U_CHK",iRowindex);
if (U_CHK == "N")
{
oGrid.DataTable.SetValue("U_CHK", iRowindex, "Y");
if (oGrid.Rows.IsSelected(pVal.Row) == false)
{
oGrid.Rows.SelectedRows.Add(pVal.Row);
}
}
}
oCFL = null;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
finally
{
oCFLEvento = null;
oDataTable = null;
}
}
示例5: ET_grd_BFMatrixLinkPressed
public virtual bool ET_grd_BFMatrixLinkPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.ColUID == "Code")
{
int oRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
string Code = oGrid.DataTable.GetValue("Code", oRowIndex).ToString();
SO.SO_COMMON_HRD.KeyValue = Code;// FN.GetGridCellValue(ref oGrid, "READCD", pVal.Row);
B1Connections.theAppl.ActivateMenuItem("KIS_SO0030A_HRD");
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return false;
}
示例6: SubFormInit
public void SubFormInit(string KeyValue)
{
this.LoadForm();
oForm = B1Connections.theAppl.Forms.Item(formuid);
oForm.Freeze(true);
this.Act1_FormInit();
if (oForm.Mode != BoFormMode.fm_VIEW_MODE) { oForm.Mode = BoFormMode.fm_OK_MODE; }
oForm.Freeze(false);
oForm.Visible = true;
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
for (int iLooper = 0; iLooper < oGrid.Rows.Count; iLooper++)
{
if (oGrid.DataTable.Columns.Item("Code").Cells.Item(oGrid.GetDataTableRowIndex(iLooper)).Value.ToString() == KeyValue)
{
Veiw_Grid_SelectedRow(iLooper);
break;
}
}
}
示例7: ET_grd1_BFMatrixLinkPressed
public virtual bool ET_grd1_BFMatrixLinkPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
int oRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
string KeyValue = string.Empty;
switch (pVal.ColUID)
{
case "DOCENTRY":
KeyValue = oGrid.DataTable.GetValue("DOCENTRY", oRowIndex).ToString();
LoadSubForm(oForm, "KIS_SD0050_HRD", KeyValue);
break;
case "U_CARDNM":
KeyValue = oGrid.DataTable.GetValue("U_CARDCD", oRowIndex).ToString();
B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_BusinessPartner, "", KeyValue);
break;
case "U_BPNM":
KeyValue = oGrid.DataTable.GetValue("U_BPCD", oRowIndex).ToString();
B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_BusinessPartner, "", KeyValue);
break;
default:
break;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return false;
}
示例8: ET_BFRowDataMenu_Delete
public virtual bool ET_BFRowDataMenu_Delete(MenuEvent pVal)
{
oForm = B1Connections.theAppl.Forms.ActiveForm;
// ADD YOUR ACTION CODE HERE ...
oForm.Freeze(true);
try
{
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
SelectedRows selectedRows = oGrid.Rows.SelectedRows;
for (int i = 0; i < selectedRows.Count; i++)
{
int gridRowIdx = selectedRows.Item(i, BoOrderType.ot_RowOrder);
int dataRowIdx = oGrid.GetDataTableRowIndex(gridRowIdx);
oGrid.DataTable.Rows.Remove(dataRowIdx);
}
if (oForm.Mode == BoFormMode.fm_OK_MODE)
oForm.Mode = BoFormMode.fm_UPDATE_MODE;
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
finally
{
oForm.Freeze(false);
}
return false;
}
示例9: ET_btnDEL_AFItemPressed
public virtual void ET_btnDEL_AFItemPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnDEL").Specific));
// ADD YOUR ACTION CODE HERE ...
if (CFL.COMMON_MESSAGE("?", "선택한 신청내역을 삭제 하시겠습니까?") != 1)
{
return;
}
StringBuilder sb = new StringBuilder();
string query = string.Empty;
string Code = string.Empty;
string U_STATUS = string.Empty;
string keyValue = string.Empty;
try
{
oForm.Freeze(true);
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
int rowIdx = -1;
for (int i = 0; i < oGrid.DataTable.Rows.Count; i++)
{
rowIdx = oGrid.GetDataTableRowIndex(i);
Code = oGrid.DataTable.GetValue("Code", rowIdx).ToString().Trim();
U_STATUS = oGrid.DataTable.GetValue("U_STATUS", rowIdx).ToString().Trim();
if (oGrid.DataTable.GetValue("CHK", rowIdx).ToString() == "Y")
{
if (U_STATUS == statusTypes.Close)
{
CFL.COMMON_MESSAGE("!", "선택된 신청내역 중 완료된 문서가 존재합니다.");
return;
}
keyValue += Code + ",";
}
}
if (string.IsNullOrEmpty(keyValue))
{
CFL.COMMON_MESSAGE("!", "선택된 신청내역이 없습니다.");
return;
}
B1Connections.diCompany.StartTransaction();
keyValue = keyValue.Substring(0, keyValue.Length - 1);
query = string.Format("DELETE FROM [@KIS_SO0020M_HRD] WHERE ISNULL(U_STATUS,'O') != 'C' AND Code IN ({0})", keyValue);
FN.GetRecordsetValue(query);
oGrid.AutoResizeColumns();
if (B1Connections.diCompany.InTransaction)
{
B1Connections.diCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit);
}
oForm.Items.Item("btnFIND").Click(BoCellClickType.ct_Regular);
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
if (B1Connections.diCompany.InTransaction == true)
{
B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
}
}
finally
{
oForm.Freeze(false);
}
}
示例10: ET_grd1_BFValidate
public virtual bool ET_grd1_BFValidate(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.ItemChanged || tabKeyDown)
{
oForm.Freeze(true);
int rowidx = oGrid.GetDataTableRowIndex(pVal.Row);
System.Data.DataTable Dt = null;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
// 수정내용이 있으면 자동으로 체크
if (pVal.ItemChanged) oGrid.DataTable.SetValue("U_CHK", rowidx, "Y");
switch (oGrid.Columns.Item(pVal.ColUID).UniqueID)
{
case "U_READCD":
case "U_REQYM":
string U_READCD = FN.GetGridCellValue(ref oGrid, "U_READCD", pVal.Row);
string U_REQYM = FN.GetGridCellValue(ref oGrid, "U_REQYM", pVal.Row);
#region 독자코드의 청구월에 청구금액 및 청구정보를 가져온다.
if (!string.IsNullOrEmpty(U_READCD) && !string.IsNullOrEmpty(U_REQYM))
{
Dt = FN.GetRecordsetToDataTable(string.Format("EXEC [KIS_SP_SO0240A2_HRD] @edtREADCD = '{0}', @U_USEYM = '{1}'", U_READCD, U_REQYM));
if (Dt.Rows.Count == 0)
{
FN.Trace("청구자료가 존재하지 않습니다.", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
if (tabKeyDown) B1Connections.theAppl.ActivateMenuItem("7425");
tabKeyDown = false;
return false;
}
oGrid.DataTable.SetValue("U_REQNM", rowidx, Dt.Rows[0]["U_REQNM"].ToString());
oGrid.DataTable.SetValue("U_CARDCD", rowidx, Dt.Rows[0]["U_CARDCD"].ToString());
oGrid.DataTable.SetValue("U_AMT", rowidx, Dt.Rows[0]["U_AMT"].ToString());
oGrid.DataTable.SetValue("U_MODAMT", rowidx, Dt.Rows[0]["U_MODAMT"].ToString());
oGrid.DataTable.SetValue("U_PMETHOD", rowidx, Dt.Rows[0]["U_PMETHOD"].ToString());
oGrid.DataTable.SetValue("U_CNT", rowidx, Dt.Rows[0]["U_CNT"].ToString());
oGrid.DataTable.SetValue("U_PAYPERD", rowidx, Dt.Rows[0]["U_PAYPERD"].ToString());
oGrid.DataTable.SetValue("U_PAPERTP", rowidx, Dt.Rows[0]["U_PAPERTP"].ToString());
oGrid.DataTable.SetValue("U_BTYPE", rowidx, Dt.Rows[0]["U_BTYPE"].ToString());
oGrid.DataTable.SetValue("U_BENTRY", rowidx, Dt.Rows[0]["U_BENTRY"].ToString());
oGrid.DataTable.SetValue("U_BLINEID", rowidx, Dt.Rows[0]["U_BLINEID"].ToString());
}
#endregion
#region 독자코드의 독자정보를 가져온다.
else if (!string.IsNullOrEmpty(U_READCD))
{
string[] rValue = new string[3];
rValue = FN.GetRecordsetArrayValue(string.Format("SELECT A.U_REQNAME, A.U_CARDCD, (SELECT TOP (1) F.U_PAPERTP FROM [@KIS_SO00301_HRD] F WHERE F.CODE = A.CODE) FROM [@KIS_SO0030M_HRD] A WHERE CODE = '{0}'", U_READCD));
if (rValue == null)
{
FN.Trace("독자코드를 확인해 주세요", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
if (tabKeyDown) B1Connections.theAppl.ActivateMenuItem("7425");
tabKeyDown = false;
return false;
}
oGrid.DataTable.SetValue("U_REQNM", rowidx, (rValue == null ? "" : rValue[0]));
oGrid.DataTable.SetValue("U_CARDCD", rowidx, (rValue == null ? "" : rValue[1]));
oGrid.DataTable.SetValue("U_PAPERTP", rowidx, (rValue == null ? "" : rValue[2]));
oGrid.DataTable.SetValue("U_AMT", rowidx, 0);
oGrid.DataTable.SetValue("U_MODAMT", rowidx, 0);
oGrid.DataTable.SetValue("U_PMETHOD", rowidx, "");
oGrid.DataTable.SetValue("U_CNT", rowidx, 0);
oGrid.DataTable.SetValue("U_PAYPERD", rowidx, "");
oGrid.DataTable.SetValue("U_BTYPE", rowidx, "");
oGrid.DataTable.SetValue("U_BENTRY", rowidx, 0);
oGrid.DataTable.SetValue("U_BLINEID", rowidx, 0);
}
#endregion
#region null
else
{
oGrid.DataTable.SetValue("U_REQNM", rowidx, "");
oGrid.DataTable.SetValue("U_CARDCD", rowidx, "");
oGrid.DataTable.SetValue("U_PAPERTP", rowidx, "");
oGrid.DataTable.SetValue("U_AMT", rowidx, 0);
oGrid.DataTable.SetValue("U_MODAMT", rowidx, 0);
oGrid.DataTable.SetValue("U_PMETHOD", rowidx, "");
oGrid.DataTable.SetValue("U_CNT", rowidx, 0);
oGrid.DataTable.SetValue("U_PAYPERD", rowidx, "");
oGrid.DataTable.SetValue("U_BTYPE", rowidx, "");
oGrid.DataTable.SetValue("U_BENTRY", rowidx, 0);
oGrid.DataTable.SetValue("U_BLINEID", rowidx, 0);
if (tabKeyDown) B1Connections.theAppl.ActivateMenuItem("7425");
tabKeyDown = false;
//.........这里部分代码省略.........
示例11: ET_CallBack_AFClick
public virtual void ET_CallBack_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("CallBack").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
string popupID = oButton.Caption.ToString();
if (string.IsNullOrEmpty(popupID)) return;
// 리턴 DataTable
SAPbouiCOM.DataTable rDT = KIS_SO0001F_HRD.GetReturnDT(popupID, oForm.UniqueID);
int rowIdx = KIS_SO0001F_HRD.GetSelectRowIdx(popupID, oForm.UniqueID);
oForm.Freeze(true);
switch (popupID)
{
case "개별입금내역":
string KeyValue = rDT.GetValue("문서번호", 0).ToString();
SetFormLoadFromDBDatasource(oForm, KeyValue);
break;
case "청구잔액":
case "과입금내역":
#region 주거래은행 정보 기본 셋팅
string U_HBNKCD = string.Empty;
string[] arrHBNKCD = new string[6];
string cboDEPMD = FN.GetItemValue(ref oForm, "cboDEPMD").Trim();
if (!string.IsNullOrEmpty(cboDEPMD))
{
DataRow[] dr = SO_COMMON_HRD.CommonCodeDataTable.Select(string.Format("TYPE ='U' AND Code='SO51' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'", cboDEPMD));
// 주거래은행 기본 셋팅
// 공통코드 SO51-입금방법의 참조5번 필드값을 기본 주거래은행으로 처리함.
if (dr.Length > 0) U_HBNKCD = dr[0]["U_RMK5"].ToString().Trim();
}
if (!string.IsNullOrEmpty(U_HBNKCD))
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append(" SELECT A.AbsEntry ");
sb.Append(" , A.BankCode ");
sb.Append(" , (SELECT F.BankName FROM ODSC F WHERE F.CountryCod = A.Country AND F.BankCode = A.BankCode) AS BankName ");
sb.Append(" , A.Account ");
sb.Append(" , A.Branch ");
sb.Append(" , A.GLAccount ");
sb.Append(" FROM DSC1 A ");
sb.AppendFormat(" WHERE A.AbsEntry = {0}", U_HBNKCD);
arrHBNKCD = FN.GetRecordsetArrayValue(sb.ToString());
}
#endregion
int dataIdx = -1;
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
for (int i = 0; i < rDT.Rows.Count; i++)
{
oGrid.DataTable.Rows.Add();
dataIdx = oGrid.GetDataTableRowIndex(oGrid.DataTable.Rows.Count - 1);
oGrid.DataTable.SetValue("U_CHK", dataIdx, rDT.GetValue("U_CHK", i).ToString());
oGrid.DataTable.SetValue("DOCENTRY", dataIdx, rDT.GetValue("DOCENTRY", i).ToString());
oGrid.DataTable.SetValue("LINEID", dataIdx, rDT.GetValue("LINEID", i).ToString());
oGrid.DataTable.SetValue("VisOrder", dataIdx, rDT.GetValue("VisOrder", i).ToString());
oGrid.DataTable.SetValue("U_READCD", dataIdx, rDT.GetValue("U_READCD", i).ToString());
oGrid.DataTable.SetValue("U_REQNM", dataIdx, rDT.GetValue("U_REQNM", i).ToString());
oGrid.DataTable.SetValue("U_REQYM", dataIdx, rDT.GetValue("U_REQYM", i).ToString());
oGrid.DataTable.SetValue("U_AMT", dataIdx, rDT.GetValue("U_AMT", i).ToString());
oGrid.DataTable.SetValue("U_MODAMT", dataIdx, rDT.GetValue("U_MODAMT", i).ToString());
oGrid.DataTable.SetValue("U_DEPDT", dataIdx, rDT.GetValue("U_DEPDT", i).ToString("yyyyMMdd"));
// 입금자 - 청구처이름으로 기본 설정
//oGrid.DataTable.SetValue("U_DEPNM", dataIdx, rDT.GetValue("U_DEPNM", i).ToString());
oGrid.DataTable.SetValue("U_DEPNM", dataIdx, rDT.GetValue("U_REQNM", i).ToString());
// 입금액 - 청구잔액으로 기본 설정
//oGrid.DataTable.SetValue("U_DEPAMT", dataIdx, rDT.GetValue("U_DEPAMT", i).ToString());
if (popupID == "과입금내역")
oGrid.DataTable.SetValue("U_DEPAMT", dataIdx, (decimal.Parse(rDT.GetValue("U_AMT", i).ToString()) * -1).ToString());
else
oGrid.DataTable.SetValue("U_DEPAMT", dataIdx, rDT.GetValue("U_AMT", i).ToString());
oGrid.DataTable.SetValue("U_CMMAMT", dataIdx, rDT.GetValue("U_CMMAMT", i).ToString());
//oGrid.DataTable.SetValue("U_CREDTBP", dataIdx, rDT.GetValue("U_CREDTBP", i).ToString());
//oGrid.DataTable.SetValue("U_CREDTNO", dataIdx, rDT.GetValue("U_CREDTNO", i).ToString());
//oGrid.DataTable.SetValue("U_VALIDMY", dataIdx, rDT.GetValue("U_VALIDMY", i).ToString());
//oGrid.DataTable.SetValue("U_CREDTNM", dataIdx, rDT.GetValue("U_CREDTNM", i).ToString());
//oGrid.DataTable.SetValue("U_JMNO", dataIdx, rDT.GetValue("U_JMNO", i).ToString());
oGrid.DataTable.SetValue("U_PMETHOD", dataIdx, rDT.GetValue("U_PMETHOD", i).ToString());
//.........这里部分代码省略.........
示例12: ET_grd2_AFClick
public virtual void ET_grd2_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd2").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.Row != -1)
{
//int rowidx = oGrid.GetDataTableRowIndex(pVal.Row);
switch (oGrid.Columns.Item(pVal.ColUID).UniqueID)
{
case "U_USEYN":
SelectedRows selectedRows = oGrid.Rows.SelectedRows;
for (int i = 0; i < selectedRows.Count; i++)
{
int gridRowidx = selectedRows.Item(i, BoOrderType.ot_RowOrder);
int dataRowidx = oGrid.GetDataTableRowIndex(gridRowidx);
UpdateRowType(oGrid, "ROWTYPE", gridRowidx);
}
break;
default:
break;
}
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
//throw ex;
}
finally
{
oForm.Freeze(false);
}
}
示例13: ET_grd1_BFClick
public virtual bool ET_grd1_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
oForm.Freeze(true);
try
{
if (pVal.ColUID == "U_CHK")
{
if (oGrid.Item.Enabled)
{
if (pVal.Row >= 0)
{
int iRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
string U_CHK = oGrid.DataTable.GetValue("U_CHK", iRowIndex).ToString().Trim();
if (U_CHK == "N")
{
oGrid.DataTable.SetValue("U_CHK", iRowIndex, "Y");
}
else
{
oGrid.DataTable.SetValue("U_CHK", iRowIndex, "N");
}
((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_APPLAMT")).ColumnSetting.SumValue = GetGridCalc_SumValue("U_APPLAMT").ToString();
}
}
return false;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
finally
{
oForm.Freeze(false);
}
return true;
}
示例14: ET_grd1_BFClick
public virtual bool ET_grd1_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.Row >= 0)
{
int iRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
if (oGrid.Rows.IsSelected(pVal.Row) == false)
{
oGrid.Rows.SelectedRows.Add(pVal.Row);
}
}
}
catch (Exception)
{
throw;
}
return true;
}
示例15: ET_btnCONF_AFItemPressed
public virtual void ET_btnCONF_AFItemPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnCONF").Specific));
// ADD YOUR ACTION CODE HERE ...
#region 선택된 행을 부모창으로 복사한 후 팝업창을 닫음
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
if (FN.GetFormExistsChk(oForm.DataSources.UserDataSources.Item("pFormUID").Value.ToString()))
{
pForm = B1Connections.theAppl.Forms.Item(oForm.DataSources.UserDataSources.Item("pFormUID").Value.ToString());
SAPbouiCOM.DataTable oDT = oForm.DataSources.DataTables.Item("sboReturnDt");
XmlDocument XmlDoc = new XmlDocument();
XmlDoc.LoadXml(oGrid.DataTable.SerializeAsXML(BoDataTableXmlSelect.dxs_MetaData));
oDT.LoadSerializedXML(BoDataTableXmlSelect.dxs_MetaData, XmlDoc.InnerXml);
if (oGrid.Rows.Count > 0)
{
if (oForm.DataSources.UserDataSources.Item("pConfTp").ValueEx == SO.SO_COMMON_HRD.ConfirmType.Close.ToString())
oForm.Visible = false;
SelectedRows selectedRows = oGrid.Rows.SelectedRows;
for (int i = 0; i < selectedRows.Count; i++)
{
int gridRowIdx = selectedRows.Item(i, BoOrderType.ot_RowOrder);
int dataRowIdx = oGrid.GetDataTableRowIndex(gridRowIdx);
CopyRowDT(ref oDT, oGrid.DataTable, dataRowIdx);
}
}
if (oDT.Rows.Count == 0)//if (oDT == null)
{
B1Connections.theAppl.StatusBar.SetText(string.Format("{0}", "선택한 자료가 없습니다."), SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
else
{
CallBackEvent();
if (oForm.DataSources.UserDataSources.Item("pConfTp").ValueEx == SO.SO_COMMON_HRD.ConfirmType.Close.ToString())
FN.ItemClick(ref oForm, "2");
}
}
else
{
// 팝업창이 닫힐 때 부모창이 없는 경우 알림을 원하는 경우 주석을 푼다
B1Connections.theAppl.MessageBox("부모창이 존재하지 않습니다. 화면을 종료합니다.");
if (oForm.DataSources.UserDataSources.Item("pConfTp").ValueEx == SO.SO_COMMON_HRD.ConfirmType.Close.ToString())
FN.ItemClick(ref oForm, "2");
}
#endregion
}