コード例 #1
0
ファイル: frmDelivery.b1f.cs プロジェクト: radtek/UGRS_Full
        public SAPbouiCOM.ChooseFromList InitChooseFromLists(bool pbol, string pStrType, string pStrID, SAPbouiCOM.ChooseFromListCollection pObjCFLs) //
        {
            SAPbouiCOM.ChooseFromList lObjoCFL = null;
            try {
                SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)UIApplication.GetApplication().CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);

                oCFLCreationParams.MultiSelection = pbol;
                oCFLCreationParams.ObjectType     = pStrType;
                oCFLCreationParams.UniqueID       = pStrID;

                lObjoCFL = pObjCFLs.Add(oCFLCreationParams);

                this.UIAPIRawForm.DataSources.UserDataSources.Add(pStrID, SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
            }
            catch (Exception ex) {
                HandleException(ex, "InitCustomerChooseFromListException");
            }
            return(lObjoCFL);
        }
コード例 #2
0
        ///<summary>    Initializes the choose from lists. </summary>
        ///<remarks>    Amartinez, 08/05/2017. </remarks>
        ///<param name="pbol">      True to pbol. </param>
        ///<param name="pStrType">  Type of the string. </param>
        ///<param name="pStrID">    Identifier for the string. </param>
        ///<returns>    A ChooseFromList. </returns>
        public ChooseFromList initChooseFromLists(bool pbol, string pStrType, string pStrID, SAPbouiCOM.ChooseFromListCollection pObjCFLs) //
        {
            SAPbouiCOM.ChooseFromList lObjoCFL = null;
            try
            {
                SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)UIApplication.GetApplication().CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);

                //  Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = pbol;
                oCFLCreationParams.ObjectType     = pStrType;
                oCFLCreationParams.UniqueID       = pStrID;

                lObjoCFL = pObjCFLs.Add(oCFLCreationParams);
            }
            catch (Exception ex)
            {
                LogService.WriteError("[RemoveTicketDetail]: " + ex.Message);
                LogService.WriteError(ex);
                UIApplication.ShowMessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message));
            }
            return(lObjoCFL);
        }
コード例 #3
0
        public ChooseFromList InitChooseFromLists(bool pbolMultiselecction, string pStrType, string pStrID, SAPbouiCOM.ChooseFromListCollection pObjCFLs) //
        {
            SAPbouiCOM.ChooseFromList lObjoCFL = null;
            try
            {
                SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
                oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)UIApplication.GetApplication().CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);

                oCFLCreationParams.MultiSelection = pbolMultiselecction;
                oCFLCreationParams.ObjectType     = pStrType;
                oCFLCreationParams.UniqueID       = pStrID;

                lObjoCFL = pObjCFLs.Add(oCFLCreationParams);

                this.UIAPIRawForm.DataSources.UserDataSources.Add(pStrID, SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
            }
            catch (Exception ex)
            {
                UIApplication.ShowMessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message));
                LogService.WriteError("frmSearchRefunds (InitChooseFromLists) " + ex.Message);
                LogService.WriteError(ex);
            }
            return(lObjoCFL);
        }