本文整理汇总了C#中ItemEvent类的典型用法代码示例。如果您正苦于以下问题:C# ItemEvent类的具体用法?C# ItemEvent怎么用?C# ItemEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemEvent类属于命名空间,在下文中一共展示了ItemEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: sapApp_ItemEvent
internal void sapApp_ItemEvent(string FormUID, ref ItemEvent pVal, out bool BubbleEvent)
{
BubbleEvent = true;
foreach (var e in itemEvents)
{
((_IApplicationEvents_ItemEventEventHandler)e)(FormUID, ref pVal, out BubbleEvent);
if (!BubbleEvent)
break;
}
}
示例2: ET_1_BFItemPressed
public virtual bool ET_1_BFItemPressed(ItemEvent pVal) {
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
switch (oForm.Mode)
{
case BoFormMode.fm_ADD_MODE:
if (CheckValues() == false)
{
return false;
}
break;
case BoFormMode.fm_EDIT_MODE:
break;
case BoFormMode.fm_FIND_MODE:
break;
case BoFormMode.fm_OK_MODE:
break;
case BoFormMode.fm_PRINT_MODE:
break;
case BoFormMode.fm_UPDATE_MODE:
if (CheckValues() == false)
{
return false;
}
break;
case BoFormMode.fm_VIEW_MODE:
break;
default:
break;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例3: ET_grd_BFClick
public virtual bool ET_grd_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
// ADD YOUR ACTION CODE HERE ...
if (pVal.Row == -1)
{
oGrid.SelectionMode = BoMatrixSelect.ms_None;
}
else { oGrid.SelectionMode = BoMatrixSelect.ms_Single; }
return true;
}
示例4: ET_btnBACK_AFItemPressed
public virtual void ET_btnBACK_AFItemPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnBACK").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
string strPFormUID = oForm.DataSources.UserDataSources.Item("pFORMUID").ValueEx;
if (strPFormUID != "")
{
oForm.Visible = false;
SAPbouiCOM.Form pForm = B1Connections.theAppl.Forms.Item(strPFormUID);
pForm.Select();
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}
示例5: ET_BFFormClose
public virtual bool ET_BFFormClose(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
// ADD YOUR ACTION CODE HERE ...
try
{
string pFORMUID = oForm.DataSources.UserDataSources.Item("pFORMUID").ValueEx;
if (pFORMUID != "")
{
SAPbouiCOM.Form pform = (SAPbouiCOM.Form)B1Connections.theAppl.Forms.Item(pFORMUID);
pform.DataSources.UserDataSources.Item("cFORMUID").ValueEx = "";
pform.Close();
pform = null;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例6: ET_AFFormLoad
public virtual void ET_AFFormLoad(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
// ADD YOUR ACTION CODE HERE ...
}
示例7: ET_AFFormClose
public virtual void ET_AFFormClose(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
// ADD YOUR ACTION CODE HERE ...
// 결재방법 팝업 닫기
string strCFormUID = oForm.DataSources.UserDataSources.Item("cFORMUID").Value.ToString();
if (FN.GetFormExistsChk(strCFormUID))
{
B1Connections.theAppl.Forms.Item(strCFormUID).Close();
}
// 주소 팝업창 닫기
KIS_SO0000F_HRD.CloseForm(oForm.UniqueID);
}
示例8: ET_btnLIST_AFItemPressed
public virtual void ET_btnLIST_AFItemPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnLIST").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
string edtCode = oForm.Items.Item("edtCode").Specific.Value;
if (String.IsNullOrEmpty(edtCode))
{
B1Connections.theAppl.StatusBar.SetText("독자를 선택해주세요.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
return;
}
FindData_List(oForm, edtCode);
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}
示例9: ET_1_BFClick
public virtual bool ET_1_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("1").Specific));
// ADD YOUR ACTION CODE HERE ...
if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
{
if (!BeforSaveData_MasterValidation(oForm))
return false;
if (!BeforSaveData_LineValidation(oForm))
return false;
if (oForm.Mode == BoFormMode.fm_ADD_MODE)
{
// 저장전 독자코드가 존재하면 새로운 독자코드를 채번하고 라인데이터에 배송코드에도 적용하도록 한다.
if (GetCodeExists(oForm))
SeNewCodeApply(oForm);
}
}
return true;
}
示例10: ET_btnSTOP_AFItemPressed
public virtual void ET_btnSTOP_AFItemPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnSTOP").Specific));
// ADD YOUR ACTION CODE HERE ...
int idx = 0;
string strRowStat = string.Empty;
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);
string strStopDate = oForm.DataSources.UserDataSources.Item("edtSTOPDT").ValueEx;
//if (String.IsNullOrEmpty(strNowDate))
//{
// B1Connections.theAppl.StatusBar.SetText("중지 일자가 입력되지 않았습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
// //oForm.Items.Item("btnSTOP").Click(0);
// return ;
//}
for (int i = 1; i <= oMatrix.VisualRowCount; i++)
{
idx = GetDataTableIndexByMatrix(oMatrix, i);
strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값
if (strNowDate.CompareTo(strStopDate) >= 0)
{
// 상태값
oMatrix.SetCellWithoutValidation(i, "U_STATUS", "US");
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "US";
}
else
{
// 상태값
oMatrix.SetCellWithoutValidation(i, "U_STATUS", "UO");
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "UO";
}
// 중지일자
//oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strStopDate);
//gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);
oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strNowDate);
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);
// 배달종료일자
oMatrix.SetCellWithoutValidation(i, "U_DELVTO", strStopDate);
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);
if (string.IsNullOrEmpty(strRowStat))
{
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";
SetSumNumberOfCofies(oForm);
}
}
if (oMatrix.VisualRowCount > 0)
{
oMatrix.FlushToDataSource();
if (oForm.Mode == BoFormMode.fm_OK_MODE)
oForm.Mode = BoFormMode.fm_UPDATE_MODE;
}
}
catch (Exception)
{
throw;
}
}
示例11: ET_edtCALLPER_AFValidate
public virtual void ET_edtCALLPER_AFValidate(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oEditText = ((SAPbouiCOM.EditText)(oForm.Items.Item("edtCALLPER").Specific));
// ADD YOUR ACTION CODE HERE ....
if (pVal.ItemChanged == true)
{
if (oEditText.Value == "")
{
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
oDB_M.SetValue("U_CALLNM", 0, "");
}
}
}
示例12: ET_edtCALLPER_AFChooseFromList
public virtual void ET_edtCALLPER_AFChooseFromList(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oEditText = ((SAPbouiCOM.EditText)(oForm.Items.Item("edtCALLPER").Specific));
// ADD YOUR ACTION CODE HERE ...
//데이터를 가져오기 위해 데이터테이블 추가
SAPbouiCOM.DataTable oDataTable = FN.GetCFLSelectedObjects(pVal);
try
{
if (oForm.Mode != BoFormMode.fm_FIND_MODE)
{
if (oDataTable != null)
{
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
oDB_M.SetValue("U_CALLPER", 0, oDataTable.GetValue("USER_CODE", 0).ToString());
oDB_M.SetValue("U_CALLNM", 0, oDataTable.GetValue("U_NAME", 0).ToString());
if (oForm.Mode == BoFormMode.fm_OK_MODE)
oForm.Mode = BoFormMode.fm_UPDATE_MODE;
}
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText("ET_edtCALLPER_AFChooseFromList " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
finally
{
oDataTable = null;
}
}
示例13: ET_mtx1_DUMY_BFMatrixLinkPressed
public virtual bool ET_mtx1_DUMY_BFMatrixLinkPressed(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
string KeyValue = string.Empty;
switch (pVal.ColUID)
{
case "U_SAILCD":
string strEmpNo = FN.GetMatirxCellValue(ref oMatrix, "U_SAILCD", pVal.Row);
// 사원번호로 사원마스터 키값을 조회한다.
string strUserId = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.OHEM_Id, strEmpNo);
B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_Employee, null, strUserId);
return false;
case "U_PAYCD":
// 메모리에
SO.SO_COMMON_HRD.KeyValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pVal.Row);
B1Connections.theAppl.ActivateMenuItem("KIS_SO0050A_HRD");
return false;
default:
break;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
return false;
}
return true;
}
示例14: ET_mtx1_DUMY_AFChooseFromList
public virtual void ET_mtx1_DUMY_AFChooseFromList(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
bool bModify = false;
try
{
int idx = GetDataTableIndexByMatrix(oMatrix, pVal.Row);
switch (pVal.ColUID)
{
case "U_PAYCD"://요금제
if (oDataTable != null)
{
oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();
bModify = true;
}
break;
case "U_PAYNM"://요금제
if (oDataTable != null)
{
oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();
bModify = true;
}
break;
case "U_SAILCD"://유치자
if (oDataTable != null)
{
string strUserCode = oDataTable.GetValue("U_EMPNO", 0).ToString();
string strUserName = oDataTable.GetValue("lastName", 0).ToString();
oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILCD", strUserCode);
oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILNM", strUserName);
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILCD"] = strUserCode;
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = strUserName;
// 유치자 사용자의 부서정보를 조회한다.
string strDeptName = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.Dept_Name, strUserCode);
oMatrix.SetCellWithoutValidation(pVal.Row, "U_SDEPT", strDeptName);
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = strDeptName;
bModify = true;
}
break;
case "U_CENTCD"://분국
if (oDataTable != null)
{
oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();
bModify = true;
}
break;
case "U_CENTNM"://분국
if (oDataTable != null)
{
oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();
bModify = true;
}
break;
default:
break;
}
if (bModify)
//.........这里部分代码省略.........
示例15: SetConditionsBranchCenter
/// <summary>
/// 분국
/// </summary>
/// <param name="oMatrix"></param>
/// <param name="pVal"></param>
private void SetConditionsBranchCenter(SAPbouiCOM.Matrix oMatrix, ItemEvent pVal)
{
SAPbouiCOM.ChooseFromList oCFL;
SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams;
SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();
SAPbouiCOM.Condition oCon;
SAPbobsCOM.Recordset oRs = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
try
{
string strPaperTp = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pVal.Row);
oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)B1Connections.theAppl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);
oCFL = oForm.ChooseFromLists.Item(oCFLEvento.ChooseFromListUID);
//oCon = oCons.Add();
//oCon.Alias = "U_PAPERTP";//지종
//oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
//oCon.CondVal = strPaperTp;
//oCon.Relationship = BoConditionRelationship.cr_AND;
oCon = oCons.Add();
oCon.Alias = "U_STATUS";//상태
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oCon.CondVal = "O"; //활성된것만
oCFL.SetConditions(oCons);
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
finally
{
Marshal.ReleaseComObject(oRs);
oRs = null;
oCFL = null;
oCFLEvento = null;
oCFLCreationParams = null;
oCons = null;
oCon = null;
}
}