Exemple #1
0
        /// <summary>
        /// Method for handling Form Data Event
        /// </summary>
        /// <param name="BusinessObjectInfo"></param>
        /// <param name="BubbleEvent"></param>
        static void FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if ((BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD) && BusinessObjectInfo.BeforeAction == false)
                {
                    if (BusinessObjectInfo.FormTypeEx.ToString() == "UDO_FT_BUDGET")
                    {
                        ManageSeries    series = new ManageSeries();
                        SAPbouiCOM.Form oForm  = PublicVariable.oApplication.Forms.ActiveForm;
                        series.Enable(oForm, "20_U_Cb", "@BUDGET", "1_U_E");
                        Budget_FormEventHandler.LoadCopyToList(oForm);
                        Budget_FormEventHandler.LoadDefaults(oForm);
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                    }
                }
            }
            catch (Exception ex)
            {
                App_StatusBarEvent(
                    ex.Message
                    , SAPbouiCOM.BoMessageTime.bmt_Short
                    , SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            }
        }
Exemple #2
0
        /// <summary>
        /// Method for accessing Menu Event
        /// </summary>
        /// <param name="pVal"></param>
        /// <param name="BubbleEvent"></param>
        static void App_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.MenuUID.Equals("1282"))
                {
                    SAPbouiCOM.Form oForm = PublicVariable.oApplication.Forms.ActiveForm;
                    if (oForm.TypeEx == "UDO_FT_BUDGET")
                    {
                        Budget_FormEventHandler.LoadCopyToList(oForm);
                        Budget_FormEventHandler.LoadDefaults(oForm);
                    }
                }

                //Budget Form
                if (pVal.MenuUID.Equals("AGS_BU_BU"))
                {
                    if (pVal.BeforeAction.Equals(false))
                    {
                        Budget_FormEventHandler.CreateBudget();
                    }
                }

                //Approval Maintenance
                if (pVal.MenuUID.Equals("AGS_BU_AM"))
                {
                    if (pVal.BeforeAction.Equals(false))
                    {
                        ApprovalMaintenance_FormEventHandler.CreateAppMain();
                    }
                }

                //Budget Maintenance
                if (pVal.MenuUID.Equals("AGS_BU_BM"))
                {
                    if (pVal.BeforeAction.Equals(false))
                    {
                        BudgetMaintenance_FormEventHandler.CreateBudgetMain();
                    }
                }
            }
            catch (Exception ex)
            {
                App_StatusBarEvent(
                    ex.Message
                    , SAPbouiCOM.BoMessageTime.bmt_Short
                    , SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            }
        }