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); }
///<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); }
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); }