本文整理汇总了C#中SAPbouiCOM.Matrix.SelectRow方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.SelectRow方法的具体用法?C# Matrix.SelectRow怎么用?C# Matrix.SelectRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SAPbouiCOM.Matrix
的用法示例。
在下文中一共展示了Matrix.SelectRow方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: LastSelectedMatrixRow_Select
private void LastSelectedMatrixRow_Select(SAPbouiCOM.Form oForm)
{
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
if (gDeliverySelect > 0)
{
if (oMatrix.VisualRowCount >= gDeliverySelect)
{
if (!oMatrix.IsRowSelected(gDeliverySelect))
oMatrix.SelectRow(gDeliverySelect, true, false);
}
}
}
示例3: ET_mtx1_DUMY_AFClick
public virtual void ET_mtx1_DUMY_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
if (pVal.Row > 0)
{
oMatrix.SelectRow(pVal.Row, true, false);
gDeliverySelect = pVal.Row;
}
if (oForm.Settings.MatrixUID != pVal.ItemUID)
{
oForm.Freeze(true);
oForm.Settings.MatrixUID = pVal.ItemUID;
oMatrix.AutoResizeColumns();
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
oMatrix.AutoResizeColumns();
oForm.Freeze(false);
}
}
示例4: ET_mtx2_DUMY_AFClick
public virtual void ET_mtx2_DUMY_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
// ADD YOUR ACTION CODE HERE ...
if (pVal.Row > 0)
{
//1. 콜리스트를 선택하면 배달코드를 찾아 자동으로 선택되도록 한다.
oMatrix.SelectRow(pVal.Row, true, false);
// 1-1 콜리스트 선택된 것에서 배달코드를 찾는다.
string strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pVal.Row);
SAPbouiCOM.Matrix oMatrix1 = (SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific);
// 2. 배달코드로 배송리스트에서 메트릭스의 행을 찾는다.
var obj_Deliver = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
where row.Field<string>("DELVCD") == strDeliveryCode
select new
{
vIDX = row.Field<Int32>("IDX")
};
oMatrix1.SelectRow(obj_Deliver.Take(1).SingleOrDefault().vIDX +1, true, false);
sFindTY = "F";
}
if (oForm.Settings.MatrixUID != pVal.ItemUID)
{
oForm.Freeze(true);
oForm.Settings.MatrixUID = pVal.ItemUID;
oMatrix.AutoResizeColumns();
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
oMatrix.AutoResizeColumns();
oForm.Freeze(false);
}
}
示例5: ET_mtx_BFClick
public virtual bool ET_mtx_BFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.Row > 0)
{
if (oMatrix.VisualRowCount >= pVal.Row)
{
if (oMatrix.IsRowSelected(pVal.Row) != true)
{
oMatrix.SelectRow(pVal.Row, true, false);
}
}
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
return true;
}
示例6: ET_mtx_AFClick
public virtual void ET_mtx_AFClick(ItemEvent pVal) {
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
// ADD YOUR ACTION CODE HERE ...
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0020M_HRD");
oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00201_HRD");
if (pVal.Row != 0)
{
oMatrix.SelectRow(pVal.Row, true, false);
SelectRow = pVal.Row -1;
if (oDB_1.GetValue("U_STATUS", pVal.Row-1).ToString() == "Y")
{
oForm.Items.Item("btnTR").Enabled = false;
oForm.Items.Item("btnCAN").Enabled = true;
}
else
{
oForm.Items.Item("btnTR").Enabled = true;
oForm.Items.Item("btnCAN").Enabled = false;
}
}
}
示例7: ET_mtx_AFClick
public virtual void ET_mtx_AFClick(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
// ADD YOUR ACTION CODE HERE ...
if (pVal.Row > 0)
{
oMatrix.SelectRow(pVal.Row, true, false);
gRow = pVal.Row;
}
}
示例8: ET_mtx1_AFClick
public virtual void ET_mtx1_AFClick(ItemEvent pVal) {
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
// ADD YOUR ACTION CODE HERE ...
try
{
if (pVal.Row > 0 )
{
if (oMatrix.VisualRowCount > 0)
{
oMatrix.SelectRow(pVal.Row, true, false);
}
SetHeaderValues();
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}
示例9: SetFormLoadFromDBDatasource
/// <summary>
/// 지정된 문서를 DBDatasource로 다시 로드 합니다.
/// </summary>
/// <param name="KeyValue">문서번호(DocEntry)</param>
private void SetFormLoadFromDBDatasource()
{
oForm.Freeze(true);
try
{
string cboPUBLICA = oForm.DataSources.UserDataSources.Item("cboPUBLICA").Value;
string cboYEAR = oForm.DataSources.UserDataSources.Item("cboYEAR").Value;
string cboMONTH = oForm.DataSources.UserDataSources.Item("cboMONTH").Value;
oForm.Mode = BoFormMode.fm_OK_MODE;
SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();
SAPbouiCOM.DBDataSource oKIS_SD0170T_HRD = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SD0170T_HRD");
SAPbouiCOM.Condition oCon = null;
oCon = oCons.Add();
oCon.Alias = "U_PUBLICA";
oCon.Operation = BoConditionOperation.co_EQUAL;
oCon.CondVal = cboPUBLICA;
oCon.Relationship = BoConditionRelationship.cr_AND;
oCon = oCons.Add();
oCon.Alias = "U_YEAR";
oCon.Operation = BoConditionOperation.co_EQUAL;
oCon.CondVal = cboYEAR;
if (string.IsNullOrEmpty(cboMONTH) == false)
{
oCon.Relationship = BoConditionRelationship.cr_AND;
oCon = oCons.Add();
oCon.Alias = "U_MONTH";
oCon.Operation = BoConditionOperation.co_EQUAL;
oCon.CondVal = cboMONTH;
}
oKIS_SD0170T_HRD.Query(oCons);
oMatrix = oForm.Items.Item("mtx1").Specific;
oMatrix.LoadFromDataSource();
//월 데이터
if (string.IsNullOrEmpty(cboMONTH)==false)
{
FN.SetItemEnable(oForm, "btnADD", true);
}
oCon = null;
oCons = null;
oKIS_SD0170T_HRD = null;
/* 아래 코드부터는 ET_AFFormDataLoad 이벤트와 동일하게 설정해준다.*/
if (oMatrix.VisualRowCount>0)
{
oMatrix.SelectRow(1, true, false);
}
SetHeaderValues();
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
finally
{
oForm.Freeze(false);
}
}