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


C# SAPbouiCOM.Select方法代码示例

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


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

示例1: SetComboBoxValue

        public void SetComboBoxValue(SAPbouiCOM.ComboBox cb, string value) //combobox a değer set et
        {
            try
            {
                cb.Select(value);
            }
            catch
            {

            }
        }
开发者ID:ozeraydin57,项目名称:Sap-Business-One-B1-Helper-Class,代码行数:11,代码来源:HelperComboBox.cs

示例2: SetComboValue_STATUS

        /// <summary>
        /// 현재 고과상태의 위아래 한단계 콤보리스트를 생성한다.
        /// </summary>
        /// <param name="pComboBox"></param>
        /// <param name="pEnumWholeTp"></param>
        /// <param name="pYearMonth"></param>
        public static void SetComboValue_STATUS(ref SAPbouiCOM.ComboBox pComboBox, FN.Enum_WholeTp pEnumWholeTp, string pSTATUS)
        {
            SAPbobsCOM.Recordset oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
            StringBuilder sb = new StringBuilder();
            string sQry = string.Empty;
            string Status = string.Empty;


            try
            {
                if (string.IsNullOrEmpty(pSTATUS))
                {
                    Status = "0";
                }
                else
                {
                    sb.Clear();
                    sb.AppendFormat("  SELECT U_SORT FROM [@KIS_AD00201] WHERE Code = 'HR10' AND U_SMLCD = '{0}'     ", pSTATUS);
                    oRS.DoQuery(sb.ToString());
                    Status = oRS.Fields.Item(0).Value.ToString();
                }
                sb.Clear();
                sb.AppendLine("   SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR10' AND U_USEYN = 'Y' ");

                sb.AppendFormat("  AND U_SORT BETWEEN '{0}'-1 AND '{0}'+1                              ", Status);

                sQry = sb.ToString();
                oRS.DoQuery(sQry);
                if (!oRS.EoF)
                {
                    FN.SetComboClear(ref pComboBox);

                    if (pEnumWholeTp == FN.Enum_WholeTp.m_Space)
                        pComboBox.ValidValues.Add("", "");
                    for (int iLooper = 0; iLooper < oRS.RecordCount; iLooper++)
                    {
                        pComboBox.ValidValues.Add(oRS.Fields.Item(0).Value.ToString(), oRS.Fields.Item(1).Value.ToString());
                        oRS.MoveNext();
                    }

                    if (!string.IsNullOrEmpty(pSTATUS))
                        pComboBox.Select(pSTATUS, SAPbouiCOM.BoSearchKey.psk_ByValue);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oRS);
                oRS = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:60,代码来源:KIS_HR0020B_HRD.cs

示例3: SetComboValue_YearMonth

        /// <summary>
        /// OFPR 기준이며 입력년월 기준으로 6개월 전 6개월 이후의  콤보리스트를 생성한다.
        /// </summary>
        /// <param name="pComboBox"></param>
        /// <param name="pEnumWholeTp"></param>
        /// <param name="pYearMonth"></param>
        public static void SetComboValue_YearMonth(ref SAPbouiCOM.ComboBox pComboBox, FN.Enum_WholeTp pEnumWholeTp, string pYearMonth)
        {
            SAPbobsCOM.Recordset oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
            StringBuilder sb = new StringBuilder();
            string strDate = string.Empty;

            try
            {
                if (string.IsNullOrEmpty(pYearMonth))
                {
                    strDate = FN.SetDateFormatToDB(DateTimeLibrary.FirstDayOfCurrentMonth(), FN.eDateType.n_YYYYMMDD);
                }
                else
                    strDate = pYearMonth + "01";

                sb.AppendLine("   SELECT CONVERT(NVARCHAR(10), ROW_NUMBER () OVER (ORDER BY Code)) AS SEQ, CONVERT (NVARCHAR (6), F_RefDate, 112) AS Code, CONVERT (NVARCHAR (7), F_RefDate, 120) AS [Desc] ");
                sb.AppendLine("     FROM OFPR                                                                                                                                        ");
                sb.AppendFormat("  WHERE F_RefDate BETWEEN DATEADD (MM, -6, CONVERT (DATE, '{0}')) AND DATEADD (MM, 6, CONVERT (DATE, '{0}'))                               ", strDate);

                oRS.DoQuery(sb.ToString());
                if (!oRS.EoF)
                {
                    FN.SetComboClear(ref pComboBox);

                    if (pEnumWholeTp == FN.Enum_WholeTp.m_Space)
                        pComboBox.ValidValues.Add("", "");
                    for (int iLooper = 0; iLooper < oRS.RecordCount; iLooper++)
                    {
                        pComboBox.ValidValues.Add(oRS.Fields.Item(1).Value.ToString(), oRS.Fields.Item(2).Value.ToString());
                        oRS.MoveNext();
                    }

                    if (!string.IsNullOrEmpty(pYearMonth))
                        pComboBox.Select(pYearMonth, SAPbouiCOM.BoSearchKey.psk_ByValue);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oRS);
                oRS = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:52,代码来源:SO_COMMON_HRD.cs

示例4: LoadComboProjetistaCadastradoOOPR

        private void LoadComboProjetistaCadastradoOOPR(SAPbouiCOM.ComboBox oComboEntrevista, SAPbouiCOM.ComboBox oComboMedicao, SAPbouiCOM.ComboBox oComboApresentacao, string idOOPR)
        {
            RecSet = projetista.trazerProjetistasOportunidade(idOOPR);
            RecSet.MoveFirst();
            int RecCount = RecSet.RecordCount;

            if (RecCount == 0)
            {
                oComboEntrevista.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue);
                oComboApresentacao.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue);
            }

            for (int RecIndex = 0; RecIndex <= RecCount - 1; RecIndex++)
            {
                string valorComboEntrevista = RecSet.Fields.Item(0).Value.ToString();
                string valorComboApresentacao = RecSet.Fields.Item(1).Value.ToString();
                string valorComboMedicao = RecSet.Fields.Item(2).Value.ToString();

                oComboEntrevista.Select(valorComboEntrevista, SAPbouiCOM.BoSearchKey.psk_ByValue);
                oComboApresentacao.Select(valorComboApresentacao, SAPbouiCOM.BoSearchKey.psk_ByValue);
                oComboMedicao.Select(valorComboMedicao, SAPbouiCOM.BoSearchKey.psk_ByValue);

                RecSet.MoveNext();
            }

            RecSet = null;
            System.GC.Collect();
        }
开发者ID:camillaamaro,项目名称:FluxusFBOne,代码行数:28,代码来源:SystemForm.cs


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