本文整理汇总了C#中SAPbouiCOM.Matrix.GetNextSelectedRow方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.GetNextSelectedRow方法的具体用法?C# Matrix.GetNextSelectedRow怎么用?C# Matrix.GetNextSelectedRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SAPbouiCOM.Matrix
的用法示例。
在下文中一共展示了Matrix.GetNextSelectedRow方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetSelectedMatrixRowIndex
private int GetSelectedMatrixRowIndex(SAPbouiCOM.Form oForm)
{
int retValue = -1;
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
retValue = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
}
catch (Exception)
{
throw;
}
return retValue;
}
示例2: DeleteMatrixRows_CALL
private bool DeleteMatrixRows_CALL(string pDeliveryCode)
{
bool bRtnValue = true;
System.Data.DataRow[] findRows = null;
string strIdx = string.Empty;
int iBtnValue = -1;
try
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
findRows = gDs.Tables[oForm.UniqueID + "_Call"].Select(string.Format(" DELVCD = '{0}' ", pDeliveryCode));
// 1. 메트릭스 삭제대상 삭제 적용
if (findRows.Count() > 0)
{
iBtnValue = B1Connections.theAppl.MessageBox("상담이력이 존재 합니다. 삭제하시겠습니까?", 1, "&Yes", "&No", "");
if (iBtnValue == 1)
{
foreach (System.Data.DataRow dr in findRows)
{
//삭제할것들 선택한다.
strIdx = dr["IDX"].ToString();
oMatrix.SelectRow(int.Parse(strIdx) + 1, true, true);
gDs.Tables[oForm.UniqueID + "_Call"].Rows.Remove(dr);
}
// 선택된 Rows를 삭제한다.
int iSelectIdx = 0;
while (iSelectIdx != -1)
{
iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
if (iSelectIdx != -1)
oMatrix.DeleteRow(iSelectIdx);
}
if (findRows.Count() > 0)
oMatrix.FlushToDataSource();
}
else
bRtnValue = false;
}
}
catch (Exception)
{
bRtnValue = false;
throw;
}
finally
{
findRows = null;
}
return bRtnValue;
}
示例3: ET_AFRowDataMenu_Add
public virtual void ET_AFRowDataMenu_Add(MenuEvent pVal)
{
oForm = B1Connections.theAppl.Forms.ActiveForm;
// ADD YOUR ACTION CODE HERE ...
string strCode = string.Empty;
string strDELIVCD = string.Empty;
if (gSelMtx == "mtx1_DUMY")
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific;
oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
// 배달코드 생성
strDELIVCD = GetMaxDelivCode(oForm);
// SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다.
int index = AddRowDataTable_DELIVER(oForm, strDELIVCD);
SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB1_Z, index.ToString(), strDELIVCD, "U_DELVCD");
}
else
{
// 배달리스트에서 선택된 라인의 배달코드
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);
strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex);
oDB2_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");
// SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다.
int index = AddRowDataTable_CALL(oForm, strDELIVCD);
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB2_Z, index.ToString(), strDELIVCD, "U_DELVCD");
// 상담리스트에 행추가하고 선택된 행의 Index 값을 가져와서 선택된 행의 수정여부를 수정한다.
iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);
oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gCallTp_IDX, true);// 콜유형
oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gComment_IDX, true);// 접수내용
}
B1Connections.theAppl.StatusBar.SetText(pVal.MenuUID.ToString(), SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_None);
}
示例4: ET_BFRowDataMenu_Add
public virtual bool ET_BFRowDataMenu_Add(MenuEvent pVal)
{
oForm = B1Connections.theAppl.Forms.ActiveForm;
bool rtnValue = true;
if (gSelMtx == "mtx1_DUMY")
{
}
else
{
// 배송리스트가 추가된 내역이 있으면
int iCount = 0;
var query = from c in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
where c.Field<string>("ROWSTATE") == "I"
select new { };
iCount = query.Count();
if (iCount > 0)
{
rtnValue = false;
B1Connections.theAppl.StatusBar.SetText("배송리스트에 추가된 내역이 존재 합니다. 갱신후 상담내용을 수정해주세요.! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);
string strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex);
if ((string.IsNullOrEmpty(strDELIVCD)) || sFindTY == "")
{
rtnValue = false;
B1Connections.theAppl.StatusBar.SetText("배송리스트를 선택해주세요! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
}
return rtnValue;
}
示例5: ET_mtx1_BFRightClick
public virtual bool ET_mtx1_BFRightClick(ContextMenuInfo pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
// ADD YOUR ACTION CODE HERE ...
iRightRowIndex = pVal.Row;
try
{
if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
{
if (pVal.Row > 0 && pVal.Row <= oMatrix.VisualRowCount)
{
//문서상태가 미결이고 행상태가 미결 때만 행삭제
if (oForm.DataSources.UserDataSources.Item("cboSTATUS").Value == "SO")
{
SAPbouiCOM.DBDataSource oKIS_SD00301_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SD00301_HRD");
if (oKIS_SD00301_HRD.Size>=pVal.Row)
{
if (oKIS_SD00301_HRD.GetValue("U_STATUS",pVal.Row-1).Trim() != "C")
{
oForm.EnableMenu("1293", true);//행삭제
}
}
oKIS_SD00301_HRD = null;
}
}
}
int oMatrixRow = oMatrix.GetNextSelectedRow();
if (oMatrixRow > 0)
{
string U_BTYPE = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_BTYPE", oMatrixRow)).Value.Trim();//기준문서 유형
string U_TTYPE = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_TTYPE", oMatrixRow)).Value.Trim();//대상문서 유형
//메뉴추가
SAPbouiCOM.MenuItem oMenuItem;
SAPbouiCOM.Menus oMenus;
SAPbouiCOM.MenuCreationParams oCreationPackage = (SAPbouiCOM.MenuCreationParams)B1Connections.theAppl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams);
if (string.IsNullOrEmpty(U_BTYPE) == false)
{
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
oCreationPackage.UniqueID = "SUB_BASEDOC";
oCreationPackage.String = "(&B)기준전표";
oCreationPackage.Enabled = true;
oMenuItem = B1Connections.theAppl.Menus.Item("1280"); //'Data'
oMenus = oMenuItem.SubMenus;
oMenus.AddEx(oCreationPackage);
}
if (string.IsNullOrEmpty(U_TTYPE) == false)
{
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
oCreationPackage.UniqueID = "SUB_TARGETDOC";
oCreationPackage.String = "(&T)대상전표";
oCreationPackage.Enabled = true;
oMenuItem = B1Connections.theAppl.Menus.Item("1280"); //'Data'
oMenus = oMenuItem.SubMenus;
oMenus.AddEx(oCreationPackage);
}
oCreationPackage = null;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例6: SetHeaderValues
/// <summary>
/// 선택된 메트릭스의 행값을 헤더의 텍스트 박스에 반영합니다.
/// </summary>
private void SetHeaderValues()
{
try
{
oMatrix = oForm.Items.Item("mtx1").Specific;
int SelectRowNumber = oMatrix.GetNextSelectedRow();
if (SelectRowNumber > 0)
{
oForm.DataSources.UserDataSources.Item("edtDOCNUM").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("DocEntry", SelectRowNumber)).Value; ;
oForm.DataSources.UserDataSources.Item("edtYEAR").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_YEAR", SelectRowNumber)).Value;
oForm.DataSources.UserDataSources.Item("edtMONTH").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_MONTH", SelectRowNumber)).Value;
oForm.DataSources.UserDataSources.Item("edtWEEK").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_WEEK", SelectRowNumber)).Value;
oForm.DataSources.UserDataSources.Item("edtFRDT").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_FRDT", SelectRowNumber)).Value;
oForm.DataSources.UserDataSources.Item("edtTODT").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_TODT", SelectRowNumber)).Value;
oForm.DataSources.UserDataSources.Item("edtAMT").Value = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_PLANSUM", SelectRowNumber)).Value;
}
else
{
oForm.DataSources.UserDataSources.Item("edtDOCNUM").Value = "";
oForm.DataSources.UserDataSources.Item("edtYEAR").Value = "";
oForm.DataSources.UserDataSources.Item("edtMONTH").Value = "";
oForm.DataSources.UserDataSources.Item("edtWEEK").Value = "";
oForm.DataSources.UserDataSources.Item("edtFRDT").Value = "";
oForm.DataSources.UserDataSources.Item("edtTODT").Value = "";
oForm.DataSources.UserDataSources.Item("edtAMT").Value = "";
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}