コード例 #1
0
        public static Item SetItem(ref SAPbouiCOM.Form oForm, string uid, BoFormItemTypes boFormItemTypes)
        {
            try
            {
                //TODO: Change to check xml file
                return(oForm.Items.Add(uid, boFormItemTypes));
            }
            catch
            {
            }

            return(oForm.Items.Item(uid));
        }
コード例 #2
0
        public static void addoColumn(
            SAPbouiCOM.IMatrix pMatrix
            , string pUID, BoFormItemTypes pType
            , int pWidth
            , string pCaption
            , string pDescription
            , bool pDisplayDesc

            , bool pBound
            , string pTableName
            , string pAlias
            , bool pEditable
            , int pForeColor
            )
        {
            SAPbouiCOM.IColumn oColumn;

            oColumn = pMatrix.Columns.Add(pUID, pType);
            if (pWidth > 0)
            {
                oColumn.Width = pWidth;
            }
            if (!string.IsNullOrEmpty(pCaption))
            {
                oColumn.TitleObject.Caption = pCaption;
            }
            if (!string.IsNullOrEmpty(pDescription))
            {
                oColumn.Description = pDescription;
            }
            if (pBound)
            {
                oColumn.DataBind.SetBound(pBound, pTableName, pAlias);
            }

            oColumn.DisplayDesc = pDisplayDesc;
            oColumn.Editable    = pEditable;
            if (pForeColor > 0)
            {
                oColumn.ForeColor = pForeColor;
            }
        }
コード例 #3
0
ファイル: FrmBase.cs プロジェクト: ahazan/FE21
        /// <summary>
        /// Agrega un control a un formulario
        /// </summary>
        public Item AgregarControl(Item item, string referencia, string UID, BoFormItemTypes tipo, int fromPane, int toPane)
        {
            try
            {
                Item itemReferencia = Formulario.Items.Item(referencia);

                item          = Formulario.Items.Add(UID, tipo);
                item.Left     = itemReferencia.Left;
                item.Top      = itemReferencia.Top + itemReferencia.Height + 1;
                item.Width    = itemReferencia.Width;
                item.Height   = itemReferencia.Height;
                item.ToPane   = toPane;
                item.FromPane = fromPane;
            }
            catch (Exception ex)
            {
            }
            finally
            {
                //itemReferencia = null;
            }
            return(item);
        }
コード例 #4
0
        public T AddItem <T>(string itemID, BoFormItemTypes itemType)
        {
            var item = APIForm.Items.Add(itemID, itemType);

            return((T)item.Specific);
        }
コード例 #5
0
 public Item AddItem(string itemID, BoFormItemTypes itemType)
 {
     return(APIForm.Items.Add(itemID, itemType));
 }