Ejemplo n.º 1
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "TransferenciasBancarias.Capa_Presentacion.PagosTransf")
                {
                    Capa_Presentacion.PagosTransf activeForm = new Capa_Presentacion.PagosTransf();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 2
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            //try
            //{
            //    if (pVal.BeforeAction && pVal.MenuUID == "Blanket_Agreement_Approve.frm_Approve")
            //    {
            //        frm_Approve activeForm = new frm_Approve();
            //        activeForm.Show();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            //}
        }
Ejemplo n.º 3
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "FuncionalidadesAdicionales")
                {
                    frmParametrosAdic activeForm = new frmParametrosAdic();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 4
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Configuration.Form1")
                {
                    ConfigurationForm activeForm = new ConfigurationForm();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 5
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "PowerBusiness.Form1")
                {
                    Form1 activeForm = new Form1();
                    activeForm.Show();
                }
            }
            catch (Exception e)
            {
                InfoBoxes.UseMessageBox(e.Message);
            }
        }
Ejemplo n.º 6
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "ChessReport.Form1")
                {
                    Form1 activeForm = new Form1();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString());
            }
        }
Ejemplo n.º 7
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "SBO_User_Table.Form1")
                {
                    UserView activeForm = new UserView();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 8
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "LandedCost_Controls.Form1")
                {
                    Form1 activeForm = new Form1();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 9
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            //try
            //{
            //    if (pVal.BeforeAction && pVal.MenuUID == "S_Issue2Production.Form1")
            //    {
            //        Form1 activeForm = new Form1();
            //        activeForm.Show();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            //}
        }
Ejemplo n.º 10
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            try {
                if (pVal.BeforeAction)
                {
                    switch (pVal.MenuUID)
                    {
                    case "UGRS.AddOnFoodTransfer.Forms.frmTransfer":
                        frmTransfer ofrmTransfer = new frmTransfer();
                        ShowForm(ofrmTransfer);

                        break;

                    case "UGRS.AddOnFoodTransfer.Forms.frmItems":
                        frmItems ofrmItems = new frmItems("0");
                        ShowForm(ofrmItems);
                        break;

                    case "UGRS.AddOnFoodTransfer.Forms.frmProcess":
                        frmProcess ofrmProcess = new frmProcess();
                        ShowForm(ofrmProcess);
                        break;
                    }
                }
                if (!pVal.BeforeAction)
                {
                    switch (pVal.MenuUID)
                    {
                    case "3088":

                        SAPbouiCOM.Form form = Application.SBO_Application.Forms.ActiveForm;

                        if (form.Title == "Solicitud de traslado" || form.Type.Equals(1250000940))
                        {
                            AddButtonToForm(form);
                        }
                        break;
                    }
                }
            }
            catch (Exception ex) {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 11
0
 public void SBO_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     if (pVal.BeforeAction == false)
     {
         return;
     }
     else
     if (pVal.BeforeAction)
     {
         switch (pVal.MenuUID)
         {
         case "M_testSDK":
             f2 f1 = new f2();
             break;
         }
     }
 }
Ejemplo n.º 12
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.CyC.frmCollection")
                {
                    frmCollection activeForm = new frmCollection();
                    activeForm.UIAPIRawForm.Left = 500;
                    activeForm.UIAPIRawForm.Top  = 10;
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 13
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Transports.Forms.frmFreights")
                {
                    if (!FormExists("freights"))
                    {
                        SetInternalParameters();
                        Forms.frmFreights lObjActiveForm = new Forms.frmFreights(mObjFreightsParams);
                        lObjActiveForm.UIAPIRawForm.Left = 500;
                        lObjActiveForm.UIAPIRawForm.Top  = 10;
                        lObjActiveForm.Show();
                    }
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Transports.Forms.frmCommissions")
                {
                    if (!FormExists("cmsns"))
                    {
                        Forms.frmCommissions lObjActiveForm = new Forms.frmCommissions();
                        lObjActiveForm.UIAPIRawForm.Left = 500;
                        lObjActiveForm.UIAPIRawForm.Top  = 10;
                        lObjActiveForm.Show();
                    }
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Transports.Forms.frmDriversCommissions")
                {
                    //SetInternalParameters();
                    frmDriversCommissions lObjActiveForm = new frmDriversCommissions();
                    lObjActiveForm.UIAPIRawForm.Left = 500;
                    lObjActiveForm.UIAPIRawForm.Top  = 10;
                    lObjActiveForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 14
0
 public override void MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     this.UIAPIRawForm.Freeze(true);
     try
     {
         if (pVal.MenuUID == "DeleteLine")
         {
             if (RowToDeleteIndex > 0)
             {
                 dtRecBatches.Rows.Remove(RowToDeleteIndex);
             }
         }
     }
     catch (Exception ex)
     {
         Application.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Long, true);
     }
     this.UIAPIRawForm.Freeze(false);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Eventos generado por los diferentes menus del sistema
 /// </summary>
 /// <param name="pVal">Objeto con el listado completo de variables de control del evento</param>
 /// <param name="BubbleEvent">Indicador booleano para detener la cola de eventos generada</param>
 void m_SBO_Appl_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     try
     {
         if (pVal.BeforeAction)
         {
             switch (pVal.MenuUID)
             {
             case "MSEI_NOM":
                 SEI_FormNominas oCAF = new SEI_FormNominas("SEI_NOM");
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         Msj_Appl.Errores(14, "m_SBO_Appl_MenuEvent() > Eventos_SBO.cs " + ex.Message);
     }
 }
Ejemplo n.º 16
0
        static void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                oForm = Application.SBO_Application.Forms.ActiveForm;
                switch (oForm.TypeEx)
                {
                case "TransferenciasBancarias.Capa_Presentacion.PagosTransf":
                    TransferenciasBancarias.Capa_Presentacion.PagosTransf.Transferencia_MenuEvent(ref pVal, out BubbleEvent);
                    break;

                default:
                    Application.SBO_Application.Menus.RemoveEx("Anular Archivo TXT");
                    break;
                }
            }
            catch (Exception) {}
        }
Ejemplo n.º 17
0
        public override void oApplication_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            base.oApplication_MenuEvent(ref pVal, out BubbleEvent);
            if (pVal.BeforeAction)
            {
                if (pVal.MenuUID == "addGrp")
                {
                    rowNum = mtSelRow(mtCA);
                    txGrpName.Item.Visible        = true;
                    oForm.Items.Item("5").Visible = true;
                    txGrpName.Value  = "";
                    txGrpName.Active = true;
                }

                if (pVal.MenuUID == "remGrp")
                {
                    rowNum = mtSelRow(mtCA);
                    removeCode();
                }
            }
        }
Ejemplo n.º 18
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "ProjectManagement_Function_AddOn.Form1")
                {
                    Form1 activeForm = new Form1();
                    activeForm.Show();
                }
                if (pVal.BeforeAction && pVal.MenuUID == "ProjectManagement_Function_AddOn.Form2")
                {
                    Form2 activeForm = new Form2();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 19
0
Archivo: Menu.cs Proyecto: xavl369/UGRS
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Permissions.Prefix")
                {
                    if (!FormExists(lStrTypeEx, lIntTypeCount))
                    {
                        Prefixes activeForm = new Prefixes();
                        activeForm.Show();
                        lStrTypeEx    = activeForm.UIAPIRawForm.TypeEx.ToString();
                        lIntTypeCount = activeForm.UIAPIRawForm.TypeCount;
                    }
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
        static void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                oForm = Application.SBO_Application.Forms.ActiveForm;

                switch (oForm.TypeEx)
                {
                case "ComisionesVentas.Parametros":
                    Parametros.Parametros_MenuEvent(ref pVal, out BubbleEvent);
                    break;

                case "ComisionesVentas.Comisiones":
                    Comisiones.Comisiones_MenuEvent(ref pVal, out BubbleEvent);
                    break;
                }
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 21
0
Archivo: Menu.cs Proyecto: xavl369/UGRS
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            try
            {
                //if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.AccountingAccounts.frmSetup" )
                //{

                //    if (!objTools.FormExists("frmSetup"))
                //    {
                //        frmSetup activeForm = new frmSetup();
                //        activeForm.Show();
                //    }
                //}
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.AccountingAccounts.frmImport")
                {
                    if (!objTools.FormExists("frmImport"))
                    {
                        frmImport activeForm = new frmImport();
                        activeForm.Show();
                    }
                }
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.AccountingAccounts.frmConfiguracion")
                {
                    if (!objTools.FormExists("frmImport"))
                    {
                        frmConfiguracion activeForm = new frmConfiguracion();
                        activeForm.Show();
                    }
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 22
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try {
                if (pVal.BeforeAction)
                {
                    switch (pVal.MenuUID)
                    {
                    case "UGRS.AddOn.Corrals.frmDelivery":
                        frmDelivery lObjfrmDelivery = new frmDelivery();
                        lObjfrmDelivery.UIAPIRawForm.Left = 500;
                        lObjfrmDelivery.UIAPIRawForm.Top  = 10;
                        lObjfrmDelivery.Show();
                        break;

                    case "UGRS.AddOn.Corrals.frmMassBilling":
                        frmMassBilling lObjfrmMassBilling = new frmMassBilling();
                        lObjfrmMassBilling.UIAPIRawForm.Left = 500;
                        lObjfrmMassBilling.UIAPIRawForm.Top  = 10;
                        lObjfrmMassBilling.Show();
                        break;

                    case "UGRS.AddOn.Corrals.frmTransfer":
                        frmTransfer lObjfrmTransfer = new frmTransfer();
                        lObjfrmTransfer.UIAPIRawForm.Left = 500;
                        lObjfrmTransfer.UIAPIRawForm.Top  = 10;
                        lObjfrmTransfer.Show();
                        break;
                    }
                }
            }
            catch (Exception ex) {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 23
0
        void m_SAPApplication_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            try
            {
                BubbleEvent = true;

                if (MenuEvent != null)
                {
                    //}
                    //BubbleEvent = true;

                    ////if (pVal.BeforeAction)
                    ////{

                    //MenuEvent myMenuEvent = new MenuEvent(pVal);

                    //GetMainForm().MenuEventsList.Push(myMenuEvent);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 24
0
        public bool HandleMenuDataEvents(SAPbouiCOM.MenuEvent menuEvent)
        {
            var result = true;

            try
            {
                switch (menuEvent.MenuUID)
                {
                case Constantes.Menu_EliminarLinea:
                    if (menuEvent.BeforeAction)
                    {
                        DeleteRow(RowItemRightClick, ItemUIDRightClick);
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                result = false;
                StatusMessageError("HandleMenuDataEvents() > " + ex.Message);
            }

            return(result);
        }
Ejemplo n.º 25
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "Colaboradores_3.Form1")
                {
                    Form1 activeForm = new Form1();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }


            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "Colaboradores_3.suprasec")
                {
                    suprasec activeForm = new suprasec();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "Colaboradores_3.seccionesgr")
                {
                    seccionesgr activeForm = new seccionesgr();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "Colaboradores_3.tipcol")
                {
                    tipcol activeForm = new tipcol();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "Colaboradores_3.edicionesgr")
                {
                    edicionesgr activeForm = new edicionesgr();
                    activeForm.Show();
                }
            }
            catch (Exception ex)
            {
                Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
            }
        }
Ejemplo n.º 26
0
 public abstract void MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent);
Ejemplo n.º 27
0
        public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            try
            {
                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.MachineryForm")
                {
                    MachineryForm lObjMachineryForm = new MachineryForm();
                    lObjMachineryForm.Show();
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmRiseSearch")
                {
                    frmRiseSearch lObjFrmRiseSearch = new frmRiseSearch();
                    lObjFrmRiseSearch.Show();
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmRisesCommissions")
                {
                    frmRisesCommissions lObjfrmRisesCommissions = new frmRisesCommissions();
                    lObjfrmRisesCommissions.Show();
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmStockTransfer")
                {
                    frmStockTransfer lObjfrmStockTransfer = new frmStockTransfer();
                    lObjfrmStockTransfer.Show();
                }

                if (pVal.BeforeAction && pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmContracts")
                {
                    frmContracts lObjFrmContracts = new frmContracts();
                    lObjFrmContracts.Show();
                }
            }
            catch (Exception ex)
            {
                LogService.WriteError(string.Format("[Menu - SBO_Application_MenuEvent: {0}]", ex.Message));

                if (ex.Message.Contains("Failed to create form. Please check the form attributes"))
                {
                    if (pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.MachineryForm")
                    {
                        UIApplication.GetApplication().Forms.Item("frmRise").Close();
                    }
                    else if (pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmRiseSearch")
                    {
                        UIApplication.GetApplication().Forms.Item("frmRSch").Close();
                    }
                    else if (pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmRisesCommissions")
                    {
                        UIApplication.GetApplication().Forms.Item("frmRCom").Close();
                    }
                    else if (pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmStockTransfer")
                    {
                        UIApplication.GetApplication().Forms.Item("frmStkTrn").Close();
                    }
                    else if (pVal.MenuUID == "UGRS.AddOn.Machinery.Forms.frmContracts")
                    {
                        UIApplication.GetApplication().Forms.Item("frmCont").Close();
                    }
                }
                else
                {
                    Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", "");
                }
            }
        }
Ejemplo n.º 28
0
        static void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            SAPbouiCOM.Form oForm;
            SAPbouiCOM.Grid oGrid;
            //(grid) = ItemActiveMenu;
            // string ItemActiveMenu = null;
            SAPbobsCOM.UserTable   oUserTable;
            SAPbouiCOM.Application oApp;
            SAPbobsCOM.Company     oCompany;
            //SAPbouiCOM.Matrix oMatrix;
            oApp     = (SAPbouiCOM.Application)Application.SBO_Application;
            oCompany = (SAPbobsCOM.Company)oApp.Company.GetDICompany();
            try
            {
                oForm = Application.SBO_Application.Forms.ActiveForm;

                switch (oForm.TypeEx)
                {
                case "Colaboradores_3.edicionesgr":
                    switch (pVal.MenuUID) //1292
                    {
                    case "1292":          //Agregar Linea Grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)
                            {
                            case "grilaedi":
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("dted");
                                DT_GRID.Rows.Add();               // Agregar una nueva linea
                                int lastRowIndex = DT_GRID.Rows.Count - 1;
                                //oGrid.GotFocusAfter.(lastRowIndex);

                                //DT_GRID.SetValue("Código", lastRowIndex, "código"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre", lastRowIndex, "Nombre"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Proyecto", lastRowIndex, "Proyecto"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre Proyecto", lastRowIndex, "[Nombre Proyecto]"); //Asignamos valor a una celda de un nuevo registro

                                break;
                            }
                        }
                        break;

                    case "1293":        //Eliminar Linea la grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)        //obtengo la grilla en el menu actual
                            {
                            case "grilaedi":
                                //aca le indico a mi grid local que sea igual que mi grilla del form activo
                                oGrid = ((SAPbouiCOM.Grid)oForm.Items.Item("grilaedi").Specific);
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("dted");
                                oUserTable = oCompany.UserTables.Item("EDICIONESCOL");
                                int nRow = (int)oGrid.Rows.SelectedRows.Item(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
                                //obtemos el campo codigo
                                String sValorGrid = Convert.ToString(oGrid.DataTable.GetValue("Código", nRow));
                                if (oUserTable.GetByKey(sValorGrid))            // verifica si hay un dato
                                {
                                    int mensValor = oApp.MessageBox("¿Esta seguro de eliminar la Edición ?", 1, "Continuar", "Cancelar", "");
                                    //if (System.Windows.Forms.MessageBox.Show("Estas seguro de que quieres eliminar esta sección.", "Advertencia", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                                    if (mensValor == 1)
                                    {
                                        //DT_GRID.Rows.Remove(nRow);
                                        int i = oUserTable.Remove();


                                        if (i != 0)
                                        {
                                            oApp.SetStatusBarMessage("Error al eliminar : " + oCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                        }
                                        else
                                        {
                                            oApp.SetStatusBarMessage("Edición Eliminada", SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                            //  oForm = ((SAPbouiCOM.Form)oForm.Items.Item("grilaedi").Specific);
                                            //oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                                            //SAPbouiCOM.Button button2 = ((SAPbouiCOM.Button)oForm.Items.Item("1").Specific);
                                            //button2.Caption = "out";
                                        }
                                    }
                                    else
                                    {
                                        BubbleEvent = false;
                                    }
                                }
                                break;
                            }
                        }
                        break;
                    }
                    break;
                }
            }
            catch (Exception) { }


            try
            {
                oForm = Application.SBO_Application.Forms.ActiveForm;

                switch (oForm.TypeEx)
                {
                case "Colaboradores_3.suprasec":
                    switch (pVal.MenuUID) //1292
                    {
                    case "1292":          //Agregar Linea Grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)
                            {
                            case "GRSPSEC":
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("DTSPSEC");
                                DT_GRID.Rows.Add();             // Agregar una nueva linea
                                int lastRowIndex = DT_GRID.Rows.Count - 1;
                                //oGrid.GotFocusAfter.(lastRowIndex);

                                //DT_GRID.SetValue("Código", lastRowIndex, "código"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre", lastRowIndex, "Nombre"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Proyecto", lastRowIndex, "Proyecto"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre Proyecto", lastRowIndex, "[Nombre Proyecto]"); //Asignamos valor a una celda de un nuevo registro

                                break;
                            }
                        }
                        break;

                    case "1293":        //Eliminar Linea la grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)        //obtengo la grilla en el menu actual
                            {
                            case "GRSPSEC":
                                //aca le indico a mi grid local que sea igual que mi grilla del form activo
                                oGrid = ((SAPbouiCOM.Grid)oForm.Items.Item("GRSPSEC").Specific);
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("DTSPSEC");
                                oUserTable = oCompany.UserTables.Item("SUPRASECCIONESCOL");
                                int nRow = (int)oGrid.Rows.SelectedRows.Item(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
                                //obtemos el campo codigo
                                String sValorGrid = Convert.ToString(oGrid.DataTable.GetValue("Código", nRow));
                                if (oUserTable.GetByKey(sValorGrid))            // verifica si hay un dato
                                {
                                    int mensValor = oApp.MessageBox("¿Esta seguro de eliminar la Supra-sección ?", 1, "Continuar", "Cancelar", "");
                                    //if (System.Windows.Forms.MessageBox.Show("Estas seguro de que quieres eliminar esta sección.", "Advertencia", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                                    if (mensValor == 1)
                                    {
                                        //DT_GRID.Rows.Remove(nRow);
                                        int i = oUserTable.Remove();


                                        if (i != 0)
                                        {
                                            oApp.SetStatusBarMessage("Error al eliminar : " + oCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                        }
                                        else
                                        {
                                            oApp.SetStatusBarMessage("Supra-Sección Eliminada", SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                            //  oForm = ((SAPbouiCOM.Form)oForm.Items.Item("grilaedi").Specific);
                                            //oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                                            //SAPbouiCOM.Button button2 = ((SAPbouiCOM.Button)oForm.Items.Item("1").Specific);
                                            //button2.Caption = "out";
                                        }
                                    }
                                    else
                                    {
                                        BubbleEvent = false;
                                    }
                                }
                                break;
                            }
                        }
                        break;
                    }
                    break;
                }
            }
            catch (Exception) { }



            try
            {
                oForm = Application.SBO_Application.Forms.ActiveForm;

                switch (oForm.TypeEx)
                {
                case "Colaboradores_3.seccionesgr":
                    switch (pVal.MenuUID) //1292
                    {
                    case "1292":          //Agregar Linea Grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)
                            {
                            case "GRSEC":
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("DTSEC");
                                DT_GRID.Rows.Add();             // Agregar una nueva linea
                                int lastRowIndex = DT_GRID.Rows.Count - 1;
                                //oGrid.GotFocusAfter.(lastRowIndex);

                                //DT_GRID.SetValue("Código", lastRowIndex, "código"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre", lastRowIndex, "Nombre"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Proyecto", lastRowIndex, "Proyecto"); //Asignamos valor a una celda de un nuevo registro
                                //DT_GRID.SetValue("Nombre Proyecto", lastRowIndex, "[Nombre Proyecto]"); //Asignamos valor a una celda de un nuevo registro

                                break;
                            }
                        }
                        break;

                    case "1293":        //Eliminar Linea la grilla
                        if (pVal.BeforeAction == true)
                        {
                            switch (ItemActiveMenu)        //obtengo la grilla en el menu actual
                            {
                            case "GRSEC":
                                //aca le indico a mi grid local que sea igual que mi grilla del form activo
                                oGrid = ((SAPbouiCOM.Grid)oForm.Items.Item("GRSEC").Specific);
                                SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("DTSEC");
                                oUserTable = oCompany.UserTables.Item("SECCIONESCOL");
                                int nRow = (int)oGrid.Rows.SelectedRows.Item(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
                                //obtemos el campo codigo
                                String sValorGrid = Convert.ToString(oGrid.DataTable.GetValue("Código", nRow));
                                if (oUserTable.GetByKey(sValorGrid))            // verifica si hay un dato
                                {
                                    //le pregunto si realmente desea eliminar la fila
                                    int mensValor = oApp.MessageBox("¿Esta seguro de eliminar la sección ?", 1, "Continuar", "Cancelar", "");
                                    //if (System.Windows.Forms.MessageBox.Show("Estas seguro de que quieres eliminar esta sección.", "Advertencia", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                                    if (mensValor == 1)
                                    {
                                        //DT_GRID.Rows.Remove(nRow);
                                        int i = oUserTable.Remove();


                                        if (i != 0)
                                        {
                                            oApp.SetStatusBarMessage("Error al eliminar : " + oCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                        }
                                        else
                                        {
                                            oApp.SetStatusBarMessage("Sección Eliminada", SAPbouiCOM.BoMessageTime.bmt_Medium, false);
                                        }
                                    }
                                    else
                                    {
                                        BubbleEvent = false;
                                    }
                                }
                                break;
                            }
                        }
                        break;
                    }
                    break;
                }
            }
            catch (Exception) { }



            //try
            //{
            //    oForm = Application.SBO_Application.Forms.ActiveForm;

            //    switch (oForm.TypeEx)
            //    {
            //        case "Colaboradores_3.edimatr":
            //            switch (pVal.MenuUID)//1292
            //            {
            //                case "1292"://Agregar Linea Matrix
            //                    if (pVal.BeforeAction == true)
            //                    {
            //                        switch (ItemActiveMenu)
            //                        {

            //                            case "Item_2":

            //                                AddLineMatrixDBDataSource(((SAPbouiCOM.Matrix)oForm.Items.Item("Item_2").Specific), oForm.DataSources.DBDataSources.Item("@EDICIONESCOL"), "U_CodigoEDC");
            //                                break;
            //                                //SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("dted");
            //                                //DT_GRID.Rows.Add(); // Agregar una nueva linea
            //                                //int lastRowIndex = DT_GRID.Rows.Count - 1;

            //                                //DT_GRID.SetValue("Código", lastRowIndex, "código"); //Asignamos valor a una celda de un nuevo registro
            //                                //DT_GRID.SetValue("Nombre", lastRowIndex, "Nombre"); //Asignamos valor a una celda de un nuevo registro
            //                                //DT_GRID.SetValue("Proyecto", lastRowIndex, "Proyecto"); //Asignamos valor a una celda de un nuevo registro
            //                                //DT_GRID.SetValue("Nombre Proyecto", lastRowIndex, "[Nombre Proyecto]"); //Asignamos valor a una celda de un nuevo registro


            //                        }
            //                    }
            //                    break;
            //                case "1293"://Eliminar Linea Matrix
            //                    if (pVal.BeforeAction == true)
            //                    {
            //                        switch (ItemActiveMenu)
            //                        {
            //                            case "Item_2":

            //                        //        SAPbouiCOM.DataTable DT_GRID = oForm.DataSources.DataTables.Item("grilaedi");
            //                        //        //   DT_GRID.Rows.Remove(NumeroRow);
            //                        //        break;

            //                                oMatrix = ((SAPbouiCOM.Matrix)oForm.Items.Item("Item_2").Specific);
            //                                SAPbouiCOM.DBDataSource oDBDataSource = oForm.DataSources.DBDataSources.Item("@EDICIONESCOL");
            //                                int nRow = (int)oMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
            //                                oMatrix.FlushToDataSource();
            //                                oDBDataSource.RemoveRecord(nRow-1);
            //                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE;
            //                                oMatrix.LoadFromDataSource();
            //                                BubbleEvent = false;
            //                                break;
            //                        }
            //                    }
            //                    break;
            //            }
            //            break;
            //    }
            //}
            //catch (Exception) { }
        }
Ejemplo n.º 29
0
 public bool HandleMenuDataEvents(SAPbouiCOM.MenuEvent menuEvent)
 {
     return(true);
 }
Ejemplo n.º 30
0
    private void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
    {
        BubbleEvent = true;
        try
        {
            if (pVal.BeforeAction == true)
            {
                switch (pVal.MenuUID)
                {
                case formExportBP:
                    CreateExportBp();
                    break;

                case formExportItemMaster:
                    CreateExportItem();
                    break;

                case formExportSO:
                    CreateExportSO();
                    break;

                case formEmailPaymentSO:
                    CreateMenuCreatePaymentForSO();
                    break;

                case formSyncUpload:
                    CreateSyncUpload();
                    break;

                case formEmailEstimates:
                    CreateSendEmailSO();
                    break;

                case formEmailPaymentPending:
                    CreatePendEmail();
                    break;

                case formEmailPaymentReceived:
                    CreateRecPay();
                    break;

                case formSyncDownload:
                    CreateSyncSO();
                    break;

                    /*
                     * case menuCAcctValidate:
                     * if (SBO_Application.MessageBox("Validate credit card account?", 1, "Yes", "No") == 1)
                     * {
                     *  tProcess = new Thread(ValidateCardAccount);
                     *  tProcess.Start();
                     *  return;
                     * }
                     * break;
                     * case menuTerminal:
                     * TermAmount = "";
                     * TermFunc = "";
                     * TermGroup = "";
                     * CreateTerminalForm();
                     * break;
                     * case menuCustImp:
                     * CreateCustImpForm();
                     * break;
                     * case menuOrderImp:
                     * CreateOrderImpForm();
                     * break;
                     * case menueBizConnect:
                     * CreateeBizConnectForm();
                     * break;
                     * case menuePaymentForm:
                     * CreateePaymentFormForm();
                     * break;
                     *
                     * case menuCfg:
                     * CreateCfgForm();
                     * break;
                     * case menuBatchInv:
                     * CreateBatchInvForm();
                     * break;
                     * case menuRBilling:
                     * CreateRBillingForm();
                     * break;
                     * case "5892":  //Payment means
                     *
                     * try
                     * {
                     *  try
                     *  {
                     *      SAPbouiCOM.Form act = SBO_Application.Forms.ActiveForm;
                     *      if (act != null)
                     *          theActiveForm = act;
                     *  }
                     *  catch (Exception ex)
                     *  {
                     *      errorLog(ex);
                     *  }
                     *  if (beBizChargeClicked)
                     *  {
                     *      beBizChargeClicked = false;
                     *      bUsePaymentMean = false;
                     *  }
                     *  else
                     *  {
                     *      if (theActiveForm.TypeEx == FORMINCOMINGPAYMENT && getFormItemVal(theActiveForm, "1") != "Add")
                     *      {
                     *          bUsePaymentMean = true;
                     *      }
                     *      if (theActiveForm.TypeEx != FORMINCOMINGPAYMENT)
                     *      {
                     *          bUsePaymentMean = true;
                     *      }
                     *      else
                     *      {
                     *          bUsePaymentMean = false;
                     *      }
                     *  }
                     * }
                     * catch (Exception)
                     * { }
                     *
                     * break;
                     * case "1284":  //Cancel
                     * try
                     * {
                     *  try
                     *  {
                     *      SAPbouiCOM.Form act = SBO_Application.Forms.ActiveForm;
                     *      if (act != null)
                     *      {
                     *          if (act.TypeEx != FORMINCOMINGPAYMENT && act.TypeEx != FORMSALESORDER && act.TypeEx != FORMSALESQUOTE)
                     *              return;
                     *      }
                     *  }
                     *  catch (Exception ex)
                     *  {
                     *      errorLog("menu cancel excception: " + ex.Message);
                     *  }
                     *  if (theActiveForm == null)
                     *      return;
                     *  if (theActiveForm.TypeEx != FORMINCOMINGPAYMENT && theActiveForm.TypeEx != FORMSALESORDER && theActiveForm.TypeEx != FORMSALESQUOTE)
                     *      return;
                     *  if (theActiveForm.TypeEx == FORMSALESORDER || theActiveForm.TypeEx == FORMSALESQUOTE)
                     *      formPayment = null;
                     *  string refNum = "";
                     *  string invoicenum = "";
                     *  double amount = 0;
                     *  double creditsum = 0;
                     *  if (formPayment != null)
                     *  {
                     *      string docID = getFormItemVal(formPayment, "3");
                     *      if (formPayment.TypeEx == "170")
                     *      {
                     *          bAuto = false;
                     *          /*
                     *          if (SBO_Application.MessageBox("Do you want to force cancel this incoming payment?", 1, "Yes", "No") == 1)
                     *          {
                     *              paymentForceCancel(docID);
                     *              if (SBO_Application.MessageBox("Payment document cancelled. Do you want to continue?", 1, "Yes", "No") != 1)
                     *              {
                     *                  bAuto = false;
                     *                  BubbleEvent = false;
                     *                  return;
                     *              }
                     *          }
                     */
                    /*
                     * SAPbobsCOM.Recordset oCustomerRS = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                     * oCustomerRS.DoQuery("select \"ConfNum\", \"CreditSum\" from \"RCT3\" where \"DocNum\"=" + docID);
                     * if (!oCustomerRS.EoF)
                     * {
                     *  refNum = GetFieldVal(oCustomerRS, 0);
                     *  creditsum = (double)oCustomerRS.Fields.Item(1).Value;
                     *  oCustomerRS = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                     *  string sql = string.Format("select \"U_refNum\",\"U_InvoiceID\", \"U_amount\", \"U_DownPaymentInvID\" from \"@CCTRANS\" where \"U_refNum\" = '{0}'", refNum);
                     *
                     *  oCustomerRS.DoQuery(sql);
                     *  if (!oCustomerRS.EoF)
                     *  {
                     *      string invID = GetFieldVal(oCustomerRS, 1);
                     *      amount = getDoubleValue(GetFieldVal(oCustomerRS, 2));
                     *
                     *      string DownPaymentInvoiceID = GetFieldVal(oCustomerRS, 3);
                     *      if (DownPaymentInvoiceID != "" && DownPaymentInvoiceID != null && invID != "" && invID != null)
                     *      {
                     *          invoicenum = getDocNum("OINV", invID).ToString();
                     *          if (SBO_Application.MessageBox("Cannot cancel a document with down payment that was drawn to an invoice. Do you want to continue?", 1, "Yes", "No") != 1)
                     *          {
                     *              bAuto = false;
                     *              BubbleEvent = false;
                     *              return;
                     *          }
                     *      }
                     *  }
                     *
                     * }
                     * }
                     * if (formPayment.TypeEx == "426")  //Outgoing
                     * {
                     * SAPbobsCOM.Recordset oCustomerRS = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                     * oCustomerRS.DoQuery("select \"ref2\" from OVPM where \"DocNum\"=" + docID);
                     * if (!oCustomerRS.EoF)
                     *  refNum = GetFieldVal(oCustomerRS, 0);
                     *
                     * }
                     * }
                     * else
                     * {
                     * try
                     * {
                     * SAPbouiCOM.Form form = SBO_Application.Forms.ActiveForm;
                     * if (form != null)
                     * {
                     *  if (form.TypeEx == FORMSALESORDER)  //Sales Order
                     *  {
                     *
                     *      SODocEntry = form.DataSources.DBDataSources.Item("ORDR").GetValue("DocEntry", 0);
                     *      SAPbobsCOM.Recordset oCustomerRS = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                     *      oCustomerRS.DoQuery(string.Format("select \"U_refNum\" from \"@CCTRANS\" where \"U_OrderID\" = '{0}' and \"U_command\"='cc:authonly' and not exists(select 1 from \"@CCTRANS\" where \"U_OrderID\"='{0}' and \"U_command\"='cc:void')", SODocEntry));
                     *      if (!oCustomerRS.EoF)
                     *      {
                     *          refNum = GetFieldVal(oCustomerRS, 0);
                     *      }
                     *  }
                     *  if (form.TypeEx == FORMSALESQUOTE)  //Sales quote
                     *  {
                     *
                     *      string qid = form.DataSources.DBDataSources.Item("OQUT").GetValue("DocEntry", 0);
                     *      SAPbobsCOM.Recordset oCustomerRS = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                     *      oCustomerRS.DoQuery(string.Format("select \"U_refNum\" from \"@CCTRANS\" where \"U_QuoteID\" = '{0}' and \"U_command\"='cc:authonly' and not exists(select 1 from \"@CCTRANS\" where \"U_QuoteID\"='{0}' and \"U_command\"='cc:void')", qid));
                     *      if (!oCustomerRS.EoF)
                     *          refNum = GetFieldVal(oCustomerRS, 0);
                     *  }
                     * }
                     * }
                     * catch (Exception ex)
                     * {
                     * errorLog("Menu Sales order Cancel exception. " + ex.Message);
                     * }
                     * }
                     *
                     * if (refNum != "")
                     * {
                     * bAuto = false;
                     * if (SBO_Application.MessageBox("Void transaction " + refNum + "?", 1, "Yes", "No") == 1)
                     * {
                     * if (!voidCustomer(refNum, false))
                     * {
                     *  BubbleEvent = true;
                     *  bAuto = false;
                     * }
                     * else
                     * {
                     *  BubbleEvent = true;
                     *  bAuto = true;
                     *  bVoidCloseForm = true;
                     *  string subject = string.Format("Transaction Voided. Invoice: {0} amount: {1}", invoicenum, amount);
                     *  string body = string.Format("Invoice: {0}\r\n\r\nAmount: {1}\r\n\r\nTransaction ID: {2}", invoicenum, amount, refNum);
                     *  bool bRes = sendEmailViaOutlook(userEmail,
                     * cfgmerchantEmail, null,
                     * subject,
                     * body,
                     * null,
                     * null);
                     *
                     * }
                     * }
                     * else
                     * {
                     * BubbleEvent = true;
                     * bAuto = false;
                     * };
                     * }
                     * }
                     * catch (Exception ex)
                     * {
                     * errorLog("Menu Cancel exception. " + ex.Message);
                     * }
                     * break;
                     *
                     * }
                     * }
                     * else
                     * {
                     * switch (pVal.MenuUID)
                     * {
                     * case "1288":
                     * case "1289":
                     * case "1290":
                     * case menuIDLastRecord:
                     * try
                     * {
                     * if (theActiveForm != null)
                     * {
                     * if (theActiveForm.TypeEx == FORMBPARTNER)
                     * {
                     * if (theActiveForm.PaneLevel == panePM)
                     *  theActiveForm.Items.Item(tbeBizCharge).Click();
                     *
                     * }
                     * else if (theActiveForm.TypeEx == FORMCREDITMEMO
                     || theActiveForm.TypeEx == FORMDOWNPAYMENT
                     || theActiveForm.TypeEx == FORMINVOICE
                     || theActiveForm.TypeEx == FORMSALESQUOTE
                     || theActiveForm.TypeEx == FORMSALESORDER)
                     ||{
                     ||if (theActiveForm.PaneLevel == paneCCLog)
                     || theActiveForm.Items.Item(tbCreditCard).Click();
                     ||
                     ||}
                     ||}
                     ||}
                     ||catch (Exception) { }
                     ||break;
                     ||case "1284":  //cancel
                     ||{
                     ||
                     ||if (bVoidCloseForm)
                     ||{
                     ||bVoidCloseForm = false;
                     ||bAuto = true;
                     ||tProcess = new Thread(VoidCloseFormProc);
                     ||tProcess.Start();
                     ||}
                     ||
                     ||}
                     ||break;
                     */
                }
            }
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
    }