当前位置: 首页>>代码示例>>C#>>正文


C# Matrix.GetCellSpecific方法代码示例

本文整理汇总了C#中SAPbouiCOM.Matrix.GetCellSpecific方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix.GetCellSpecific方法的具体用法?C# Matrix.GetCellSpecific怎么用?C# Matrix.GetCellSpecific使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SAPbouiCOM.Matrix的用法示例。


在下文中一共展示了Matrix.GetCellSpecific方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ET_mtx2_DUMY_BFClick

        public virtual bool ET_mtx2_DUMY_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            string USERID = string.Empty;

            if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                USERID = B1Connections.diCompany.UserName.ToString();
                if ((oMatrix.VisualRowCount > 0) && (pVal.Row > 0))
                {
                    if (oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() != USERID)
                    {
                        oForm.EnableMenu("1293", false); //행삭제
                    }
                    else
                    {
                        oForm.EnableMenu("1293", true); //행삭제
                    }
                }
                else
                    oForm.EnableMenu("1293", false); //행삭제
          
                oForm.EnableMenu("1292", true);//행추가
                gRowIdx = pVal.Row;
                gSelMtx = pVal.ItemUID;
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:31,代码来源:KIS_SO0030A_HRD.cs

示例2: ET_mtx2_DUMY_AFDoubleClick

        public virtual void ET_mtx2_DUMY_AFDoubleClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            string sTYPE = "";
            try
            {
                if (pVal.Row != 0)
                {
                    //접수자ID 와 로그인 ID 가 다를경우 접수내용 수정 불가
                    oMatrix.FlushToDataSource();

                    if ((oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() == B1Connections.diCompany.UserName.ToString()) && (sFindTY == "F"))
                    { sTYPE = "TRUE"; }
                    else { sTYPE = "FASLE"; }

                    oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
                    string extCOM = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_MEMO", pVal.Row)).Value.Trim();
                    string strChildFormID = oForm.DataSources.UserDataSources.Item("cFORMUID2").Value;
                    if (!FN.GetFormExistsChk(strChildFormID))
                    {
                        KIS_SO0033A_HRD SO0033A_HRD = new KIS_SO0033A_HRD();
                        SO0033A_HRD.A00_SubFormInit(oForm.UniqueID, pVal.Row, extCOM, "접수내용", "CallBack", sTYPE);
                        SO0033A_HRD = null;
                    }
                    else
                    {
                        SAPbouiCOM.Form pForm = pForm = B1Connections.theAppl.Forms.Item(strChildFormID);
                        KIS_SO0033A_HRD.extSetting(pForm, extCOM, pVal.Row);
                        pForm.Select();
                        pForm = null;
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:41,代码来源:KIS_SO0030A_HRD.cs

示例3: FindSubData

        private void FindSubData(SAPbouiCOM.Form oForm, int pRowIdx, string Type = "")
        {
            string strDeliveryCode = string.Empty;
            string strExpr = string.Empty;
            string strSort = string.Empty;
            System.Data.DataRow[] findRows = null;
            StringBuilder sb = new StringBuilder();
            int i = 0;

            try
            {
                oForm.Freeze(true);
                oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));

                oDB2_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");
                oDB2_Z.Clear();

                if (oMatrix.VisualRowCount > 0)
                {

                    strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowIdx);

                    sb.Append(" 1 = 1                                   ");
                    if (!string.IsNullOrEmpty(strDeliveryCode))
                    {
                        sb.AppendFormat(" AND DELVCD = '{0}'  ", strDeliveryCode);
                    }
                    if (Type == "")
                    {
                        sb.AppendFormat(" AND DELVCD = '{0}'  ", strDeliveryCode);
                        sFindTY = "F";
                    }
                    else
                    {
                        sFindTY = "";
                    }

                    findRows = gDs.Tables[oForm.UniqueID + "_Call"].Select(sb.ToString(), "IDX DESC");
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;

                    foreach (System.Data.DataRow dr in findRows)
                    {
                        oDB2_Z.InsertRecord(i);

                        oDB2_Z.SetValue("U_NO", i, (i + 1).ToString());
                        oDB2_Z.SetValue("U_IDX", i, dr["IDX"].ToString());//"데이터테이블 고유번호 IDX";
                        oDB2_Z.SetValue("LineId", i, dr["LINEID"].ToString());//"원본라인번호";
                        oDB2_Z.SetValue("U_DELVCD", i, dr["DELVCD"].ToString());//"배달코드"
                        oDB2_Z.SetValue("U_CALLTP", i, dr["CALLTP"].ToString());//"콜유형"
                        oDB2_Z.SetValue("U_MEMO", i, dr["MEMO"].ToString());//"접수내용"
                        oDB2_Z.SetValue("U_RECVID", i, dr["RECVID"].ToString());//"접수자ID"
                        oDB2_Z.SetValue("U_RECVNM", i, dr["RECVNM"].ToString());//"접수자명"
                        oDB2_Z.SetValue("U_RECVDT", i, dr["RECVDT"].ToString());//"접수일자"
                        oDB2_Z.SetValue("U_RECVTI", i, dr["RECVTI"].ToString());//"접수시간"
                        oDB2_Z.SetValue("U_PROCID", i, dr["PROCID"].ToString());//"처리자ID"
                        oDB2_Z.SetValue("U_PROCNM", i, dr["PROCNM"].ToString());//"처리자명"
                        oDB2_Z.SetValue("U_PROCDT", i, dr["PROCDT"].ToString());//"처리일자"
                        oDB2_Z.SetValue("U_PROSTAT", i, dr["PROSTAT"].ToString());//"처리상태"

                        i += 1;
                    }


                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                    oMatrix.LoadFromDataSource();

                    //접수자 ID와 로그인 아이디가 다를경우 수정불가
                    for (int j = 0; j < oMatrix.VisualRowCount; j++)
                    {
                        if ((oMatrix.GetCellSpecific("U_RECVID", j + 1).Value.Trim() == B1Connections.diCompany.UserName.ToString()) && (sFindTY == "F"))
                        {
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gCallTp_IDX, true);
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gComment_IDX, true);
                        }
                        else
                        {
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gCallTp_IDX, false);
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gComment_IDX, false);
                        }

                    }

                }
            }
            catch (Exception)
            {
                oForm.Freeze(false);
                throw;
            }
            finally
            {
                oForm.Freeze(false);
                findRows = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:95,代码来源:KIS_SO0030A_HRD.cs

示例4: 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;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:75,代码来源:KIS_SD0030A_HRD.cs

示例5: SetMatrixRateColumn

        /// <summary>
        /// 메트릭스의 컬럼 수수료율을 일괄 조종합니다.
        /// </summary>
        /// <param name="oColumnuid">컬럼UID</param>
        /// <param name="Rate">수수료율</param>
        private void SetMatrixRateColumn(string oColumnuid , string Rate)
        {
            oMatrix = oForm.Items.Item("mtx1").Specific;

            for (int iLooper = 1; iLooper <= oMatrix.VisualRowCount; iLooper++)
            {
                string U_ITMGRPCD = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_ITMGRPCD", iLooper)).Value;
                if (string.IsNullOrEmpty(U_ITMGRPCD) == false)
                {
                    oMatrix.SetCellWithoutValidation(iLooper, oColumnuid, Rate);
                    SetCalc(oColumnuid, iLooper);
                }
            }

            SetMatrixCalc_Sum();
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:21,代码来源:KIS_SD0030A_HRD.cs

示例6: ET_mtx1_OnLostFocus

        public virtual void ET_mtx1_OnLostFocus(ItemEvent pVal) {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            // ADD YOUR ACTION CODE HERE ...

            SAPbouiCOM.DBDataSource oKIS_HR00101_HRD = oForm.DataSources.DBDataSources.Item("@KIS_HR00101_HRD");
            if (pVal.ColUID == "U_DTCD" && oMatrix.GetCellSpecific("U_DTCD", pVal.Row).ToString() != "")
            {
                oForm.Freeze(true);
                FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oKIS_HR00101_HRD, FN.RowSelectMode.None, "U_DTCD");
                oForm.Freeze(false);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:13,代码来源:KIS_HR0010M_HRD.cs

示例7: 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);
            }
            
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:40,代码来源:KIS_SD0170A_HRD.cs


注:本文中的SAPbouiCOM.Matrix.GetCellSpecific方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。