private void AddChooseFromList() { SAPbouiCOM.ChooseFromListCollection oCFls = null; SAPbouiCOM.Conditions oCons = null; SAPbouiCOM.Condition oCon = null; oCFls = oForm.ChooseFromLists; SAPbouiCOM.ChooseFromList oCFl = null; SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null; oCFLCreationParams = ((SAPbouiCOM.ChooseFromListCreationParams)(oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams))); oCFLCreationParams.MultiSelection = false; oCFLCreationParams.ObjectType = "2"; oCFLCreationParams.UniqueID = "CFL1"; oCFl = oCFls.Add(oCFLCreationParams); oCons = oCFl.GetConditions(); oCon = oCons.Add(); oCon.Alias = "CardType"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "C"; oCFl.SetConditions(oCons); oCFLCreationParams.MultiSelection = false; oCFLCreationParams.ObjectType = "2"; oCFLCreationParams.UniqueID = "CFL2"; oCFl = oCFls.Add(oCFLCreationParams); }
private void AddChooseFromListStockTransfer() { oForm.DataSources.UserDataSources.Add("CFL_1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); SAPbouiCOM.ChooseFromListCollection oCFLs = oForm.ChooseFromLists; SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null; lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject (SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); // Adding 2 CFL, one for the button and one for the edit text. //string strCFLID = oCFLCreationParams.UniqueID lObjCFLCreationParams.MultiSelection = false; lObjCFLCreationParams.ObjectType = "1250000001"; lObjCFLCreationParams.UniqueID = "CFLDOC"; mObjChooseFromList = oCFLs.Add(lObjCFLCreationParams); oCons = mObjChooseFromList.GetConditions(); oCon = oCons.Add(); oCon.Alias = "DocStatus"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "O"; mObjChooseFromList.SetConditions(oCons); EditText1.DataBind.SetBound(true, "", "CFL_1"); EditText1.ChooseFromListUID = mObjChooseFromList.UniqueID; EditText1.ChooseFromListAlias = "DocNum"; }
private void AddChooseFromListNomina() { oForm.DataSources.UserDataSources.Add("CFL_0", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); SAPbouiCOM.ChooseFromListCollection oCFLs = oForm.ChooseFromLists; SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null; lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject (SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); // Adding 2 CFL, one for the button and one for the edit text. //string strCFLID = oCFLCreationParams.UniqueID lObjCFLCreationParams.MultiSelection = false; lObjCFLCreationParams.ObjectType = "1"; lObjCFLCreationParams.UniqueID = "OACT1"; mObjChooseFromList = oCFLs.Add(lObjCFLCreationParams); oCons = mObjChooseFromList.GetConditions(); /*oCon = oCons.Add(); * oCon.Alias = "AcctCode"; * oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; * oCon.CondVal = "C"; * * mObjChooseFromList.SetConditions(oCons);*/ txtCuentaCNom.DataBind.SetBound(true, "", "CFL_0"); txtCuentaCNom.ChooseFromListUID = mObjChooseFromList.UniqueID; txtCuentaCNom.ChooseFromListAlias = "AcctCode"; }
private void AddChooseFromList() { this.UIAPIRawForm.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); try { SAPbouiCOM.EditText lObjEditTxt = null; SAPbouiCOM.ChooseFromList lObjCFL = null; SAPbouiCOM.ChooseFromListCollection lLstCFLs = null; lLstCFLs = this.UIAPIRawForm.ChooseFromLists; SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null; lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); lObjCFLCreationParams.MultiSelection = false; lObjCFLCreationParams.ObjectType = "2"; lObjCFLCreationParams.UniqueID = "CFLBP"; lObjCFL = lLstCFLs.Add(lObjCFLCreationParams); //lObjEditTxt = lObjTxtClient; lObjTxtClient.DataBind.SetBound(true, "", "UDCFL"); lObjTxtClient.ChooseFromListUID = lObjCFL.UniqueID; lObjTxtClient.ChooseFromListAlias = "CardCode"; } catch (Exception ex) { SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message)); } }
private void AddChooseFromList() { try { SAPbouiCOM.ChooseFromListCollection oCFLs = null; SAPbouiCOM.Conditions oCons = null; SAPbouiCOM.Condition oCon = null; oCFLs = oForm.ChooseFromLists; SAPbouiCOM.ChooseFromList oCFL = null; SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null; oCFLCreationParams = ((SAPbouiCOM.ChooseFromListCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams))); // Adding 2 CFL, one for the button and one for the edit text. oCFLCreationParams.MultiSelection = false; oCFLCreationParams.ObjectType = "2"; oCFLCreationParams.UniqueID = "CFL1"; oCFL = oCFLs.Add(oCFLCreationParams); // Adding Conditions to CFL1 oCons = oCFL.GetConditions(); oCon = oCons.Add(); oCon.Alias = "CardType"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "C"; oCFL.SetConditions(oCons); oCFLCreationParams.UniqueID = "CFL2"; oCFL = oCFLs.Add(oCFLCreationParams); } catch { Interaction.MsgBox(Information.Err().Description, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); } }
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) { UIApplication.ShowMessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message)); } return(lObjoCFL); }
public static void AddChooseFromList(SAPbouiCOM.Form frm, string ObjectType, string ParamsID, string ConAlias, string CondVal) { try { SAPbouiCOM.ChooseFromListCollection oCFLs = null; SAPbouiCOM.Conditions oCons = null; SAPbouiCOM.Condition oCon = null; oCFLs = frm.ChooseFromLists; SAPbouiCOM.ChooseFromList oCFL = null; SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null; oCFLCreationParams = ((SAPbouiCOM.ChooseFromListCreationParams)(SubMain.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams))); // Adding 2 CFL, one for the button and one for the edit text. oCFLCreationParams.MultiSelection = false; oCFLCreationParams.ObjectType = ObjectType; oCFLCreationParams.UniqueID = ParamsID; oCFL = oCFLs.Add(oCFLCreationParams); // Adding Conditions to CFL1 if (ConAlias != "") { oCons = oCFL.GetConditions(); oCon = oCons.Add(); oCon.Alias = ConAlias; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = CondVal; oCFL.SetConditions(oCons); } //oCFLCreationParams.UniqueID = "CFL2"; //oCust = oCFLs.Add(oCFLCreationParams); } catch (Exception ex) { } }
private void AddChooseFromList()//aqui break point { lObjFormXml.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); string Cbx = lObjComboBox.Value.Trim(); try { SAPbouiCOM.ChooseFromListCollection oCFLs = null; SAPbouiCOM.Conditions oCons = null; SAPbouiCOM.Condition oCon = null; SAPbouiCOM.Column oColumn = null; oCFLs = lObjFormXml.ChooseFromLists; SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null; lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject (SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams); // Adding 2 CFL, one for the button and one for the edit text. //string strCFLID = oCFLCreationParams.UniqueID lObjCFLCreationParams.MultiSelection = false; if (lStrDocType.Equals("Servicios")) { lObjCFLCreationParams.ObjectType = "1"; } else { lObjCFLCreationParams.ObjectType = "4"; } lObjCFLCreationParams.UniqueID = "CFLACT"; pObjChooseFromList = oCFLs.Add(lObjCFLCreationParams); // Adding Conditions to CFL1 oCons = pObjChooseFromList.GetConditions(); //Onlu Postable Accounts if (lStrDocType.Equals("Servicios") && lStrFormType != "65301") { if (Cbx == "MXP") { #region MXP oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; #endregion } else if (Cbx == "USD") { #region USD oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "EUR"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } else if (Cbx == "EUR") { #region EUR oCon = oCons.Add(); oCon.Alias = "Postable"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "LocManTran"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "N"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "USD"; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND; oCon = oCons.Add(); oCon.Alias = "ActCurr"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL; oCon.CondVal = "MXP"; #endregion } } else if (lStrDocType.Equals("Servicios") && lStrFormType == "65301") { #region advances to suppliers oCon = oCons.Add(); oCon.Alias = "AcctCode"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "11410000"; #endregion } else { oCon = oCons.Add(); oCon.Alias = "validFor"; oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL; oCon.CondVal = "Y"; } pObjChooseFromList.SetConditions(oCons); if (oMatrix.RowCount > 0) { for (int i = oMatrix.RowCount; i >= 1; i--) { if (oMatrix.RowCount == 1) { oMatrix.ClearRowData(i); oMatrix.DeleteRow(i); } else { oMatrix.DeleteRow(i); } } } oColumn = oMatrix.Columns.Item("Col_0"); try { oColumn.DataBind.SetBound(true, "", "UDCFL"); } catch (Exception) { } oColumn.ChooseFromListUID = pObjChooseFromList.UniqueID; if (lStrDocType.Equals("Servicios")) { oColumn.ChooseFromListAlias = "AcctCode"; } else { oColumn.ChooseFromListAlias = "ItemCode"; } } catch (Exception ex) { SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message)); } }