Пример #1
0
        private void LoadXmlForm(string FileName, string FormName)
        {
            System.Xml.XmlDocument lObjXmlDoc = new System.Xml.XmlDocument();
            //string lStrPath = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]).ToString();
            string lStrPath = PathUtilities.GetCurrent("XMLforms\\ChargesModalXML.xml");

            lObjXmlDoc.Load(lStrPath);

            SAPbouiCOM.FormCreationParams lObjCreationPackage = (SAPbouiCOM.FormCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject
                                                                    (SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);

            lObjCreationPackage.XmlData = lObjXmlDoc.InnerXml;

            lObjCreationPackage.UniqueID    = FormName;
            lObjCreationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            lObjCreationPackage.Modality    = SAPbouiCOM.BoFormModality.fm_Modal;
            lObjCreationPackage.FormType    = FormName;

            lObjFormChargesXml         = SAPbouiCOM.Framework.Application.SBO_Application.Forms.AddEx(lObjCreationPackage);
            lObjFormChargesXml.Title   = "Cargos de piso";
            lObjFormChargesXml.Left    = 400;
            lObjFormChargesXml.Top     = 100;
            lObjFormChargesXml.Mode    = SAPbouiCOM.BoFormMode.fm_OK_MODE;
            lObjFormChargesXml.Visible = true;
            initFormXml();
        }
Пример #2
0
        /// <summary>
        /// funcion carga el XML del formulario
        /// </summary>
        public static void CargarXML()
        {
            XmlDocument   oXmlDoc      = null;
            ResultMessage result       = new ResultMessage();
            bool          bFormAbierto = false;

            SAPbouiCOM.Form oForm = null;
            int             index;

            try
            {
                for (index = 0; index < Conexion_SBO.m_SBO_Appl.Forms.Count; index++)
                {
                    SAPbouiCOM.Form oFormAbierto = Conexion_SBO.m_SBO_Appl.Forms.Item(index);
                    if (oFormAbierto.UniqueID.Equals("SET_VAL"))
                    {
                        bFormAbierto = true;
                        break;
                    }
                }

                // Si el form no esta abierto se abre
                if (!bFormAbierto)
                {
                    oXmlDoc = new XmlDocument();

                    String xml = "";
                    xml  = Application.StartupPath.ToString();
                    xml += "\\";
                    xml  = xml + "Formularios\\" + "FormSeting.srf";
                    oXmlDoc.Load(xml);

                    String sXML = oXmlDoc.InnerXml.ToString();
                    SAPbouiCOM.FormCreationParams creationPackage = null;
                    creationPackage          = (SAPbouiCOM.FormCreationParams)Conexion_SBO.m_SBO_Appl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
                    creationPackage.UniqueID = "SET_VAL";
                    creationPackage.FormType = "SET_VAL";
                    creationPackage.Modality = SAPbouiCOM.BoFormModality.fm_Modal;
                    creationPackage.XmlData  = sXML;
                    oForm         = Conexion_SBO.m_SBO_Appl.Forms.AddEx(creationPackage);
                    oForm.Visible = true;

                    //bool check = ((SAPbouiCOM.CheckBox)(oForm.Items.Item("Item_0").Specific)).Checked;



                    LoadInfo(oForm);
                }
                // Si no traer al frente
                else
                {
                    Conexion_SBO.m_SBO_Appl.Forms.Item(index).Select();
                }
            }
            catch (Exception ex)
            {
                result = Msj_Appl.Errores(14, "CargarXML > SEI_FormSetVal.cs " + ex.Message);
                Conexion_SBO.m_SBO_Appl.StatusBar.SetText(result.Mensaje, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
        }
Пример #3
0
    private void createForm(string uni, string _title)
    {
        SAPbouiCOM.FormCreationParams creationPackage = default(SAPbouiCOM.FormCreationParams);
        creationPackage          = (SAPbouiCOM.FormCreationParams)SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
        creationPackage.UniqueID = uni;
        oForm = SBO_Application.Forms.AddEx(creationPackage);

        oForm.Title  = _title;
        oForm.Top    = 44;
        oForm.Left   = 336;
        oForm.Width  = 900;
        oForm.Height = 300;
    }
Пример #4
0
        static SAPbouiCOM.Form ViaXML(string xmlData)
        {
            SAPbouiCOM.Form oForm = null;
            try
            {
                SAPbouiCOM.FormCreationParams oFCP = (SAPbouiCOM.FormCreationParams)PublicVariable.oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
                oFCP.XmlData = xmlData;
                oForm        = PublicVariable.oApplication.Forms.AddEx(oFCP);
            }
            catch (Exception ex)
            {
                PublicVariable.oApplication.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }

            return(oForm);
        }
Пример #5
0
        private void LoadFromXml(string FileName, string FormName, int pIntTop, int pIntLeft)
        {
            System.Xml.XmlDocument oXmlDoc = new System.Xml.XmlDocument();
            //string sPath = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]).ToString();
            string sPath = PathUtilities.GetCurrent("XmlForms");

            oXmlDoc.Load(sPath + "\\" + FileName);

            SAPbouiCOM.FormCreationParams creationPackage = (SAPbouiCOM.FormCreationParams)Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);

            creationPackage.XmlData = oXmlDoc.InnerXml;

            if (FormName.Equals("mFrmEarringRanks"))
            {
                //UGRS.AddOn.Cuarentenarias.Utils.utils.FormExists(FormName);

                creationPackage.UniqueID    = FormName;
                creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
                //creationPackage.Modality = SAPbouiCOM.BoFormModality.fm_Modal;
                creationPackage.FormType = "mFrmEarringRanks";

                //creationPackage.
                var lObjForms = SAPbouiCOM.Framework.Application.SBO_Application.Forms;
                foreach (SAPbouiCOM.Form lObjForm in lObjForms)
                {
                    if (lObjForm.UniqueID == "mFrmEarringRanks")
                    {
                        SAPbouiCOM.Framework.Application.SBO_Application.Forms.Item("mFrmEarringRanks").Close();
                    }
                }

                mObjRanksForm = Application.SBO_Application.Forms.AddEx(creationPackage);

                mObjRanksForm.Title   = "Rangos de aretes";
                mObjRanksForm.Left    = pIntLeft - mObjRanksForm.Width / 2;
                mObjRanksForm.Top     = pIntTop - mObjRanksForm.Height / 2;
                mObjRanksForm.Mode    = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                mObjRanksForm.Visible = true;
                initFormXml();
            }
            else
            {
                //lObjModalForm.Select();
            }
        }
Пример #6
0
        public SAPbouiCOM.Form createForm(SAPbobsCOM.Company company, SAPbouiCOM.Application application, string resource, string formName)
        {
            SAPbouiCOM.Form mForm = null;

            try
            {
                SAPbouiCOM.FormCreationParams fCreationParams = application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
                fCreationParams.XmlData  = resource;
                fCreationParams.FormType = formName;
                fCreationParams.UniqueID = formName + DateTime.Now.ToString("hhmmss");

                mForm = application.Forms.AddEx(fCreationParams);
                mForm.Settings.Enabled = true;
            }
            catch (Exception ex)
            {
                StatusMessageError("Error creando formulario " + formName + ". Excepción :" + ex.Message);
            }

            return(mForm);
        }
Пример #7
0
        public SAPbouiCOM.Form CreateFormViaXML(String xmlData)
        {
            SAPbouiCOM.Form oForm = null;

            try
            {
                SAPbouiCOM.FormCreationParams oFCP = AddOnUtilities.oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
                oFCP.XmlData = xmlData;

                // Option 1 - to load the file
                //AddOn.oApplication.LoadBatchActions(xmlData);
                // Option 2 - to load the file
                oForm = AddOnUtilities.oApplication.Forms.AddEx(oFCP);
            }
            catch (Exception ex)
            {
                AddOnUtilities.MsgBoxWrapper(ex.Message + " " + ex.StackTrace);
            }

            return(oForm);
        }
Пример #8
0
        /// <summary>
        /// Loads a form from an XML file.
        /// </summary>
        /// <param name="pName">Name of the xml file containig the form definition.</param>
        private void LoadFromXml(string pName)
        {
            XmlDocument lObjXmlDoc = new XmlDocument();

            Type lObjBaseType = this.GetType();

            if (lObjBaseType.Assembly.IsDynamic)
            {
                lObjBaseType = lObjBaseType.BaseType;
            }

            string lStrNamespace = lObjBaseType.Namespace;
            string lStrContent   = "";

            using (var lObjStream = lObjBaseType.Assembly.GetManifestResourceStream(lStrNamespace + ".XmlForms." + pName + ".xml"))
            {
                if (lObjStream != null)
                {
                    using (var lObjStreamReader = new StreamReader(lObjStream))
                    {
                        lStrContent = lObjStreamReader.ReadToEnd();
                    }
                }
            }

            lObjXmlDoc.LoadXml(lStrContent);

            SAPbouiCOM.FormCreationParams lObjCreationPackage = (SAPbouiCOM.FormCreationParams)Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
            lObjCreationPackage.XmlData  = lObjXmlDoc.InnerXml;
            lObjCreationPackage.UniqueID = pName;
            lObjCreationPackage.Modality = SAPbouiCOM.BoFormModality.fm_Modal;
            lObjCreationPackage.FormType = pName;

            mObjModal         = Application.SBO_Application.Forms.AddEx(lObjCreationPackage);
            mObjModal.Title   = "Agregar comisión";
            mObjModal.Visible = true;
            mObjModal.Top     = 200;
            mObjModal.Left    = 400;
        }
Пример #9
0
        /// <summary>
        /// Metodo LoadFromXml
        /// Metodo para cargar un Form a partir de un archivo XML
        /// <remarks>@author RCordova-2017/08/15</remarks>
        /// </summary>
        /// <param name="FileName"></param>
        /// <param name="FormName"></param>
        private void LoadFromXml(string FileName, string FormName)
        {
            System.Xml.XmlDocument oXmlDoc = new System.Xml.XmlDocument();
            //string sPath = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]).ToString();

            string sPath = PathUtilities.GetCurrent("XmlForms");

            oXmlDoc.Load(sPath + "\\" + FileName);

            SAPbouiCOM.FormCreationParams creationPackage = (SAPbouiCOM.FormCreationParams)Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);

            creationPackage.XmlData = oXmlDoc.InnerXml;

            if (FormName.Equals("frmInspDet"))
            {
                if (!Utils.FormExists(FormName))
                {
                    creationPackage.UniqueID    = FormName;
                    creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
                    creationPackage.Modality    = SAPbouiCOM.BoFormModality.fm_Modal;
                    creationPackage.FormType    = "frmInspDet";
                    //creationPackage.

                    mObjModalForm         = Application.SBO_Application.Forms.AddEx(creationPackage);
                    mObjModalForm.Title   = "Detalles de Inspección";
                    mObjModalForm.Left    = 400;
                    mObjModalForm.Top     = 100;
                    mObjModalForm.Mode    = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                    mObjModalForm.Visible = true;
                    InitFormXml();
                }
                else
                {
                    mObjModalForm.Select();
                }
            }
        }
Пример #10
0
        private void LoadXmlForm(string pStrFrmName)
        {
            System.Xml.XmlDocument lObjXmlDoc = new System.Xml.XmlDocument();
            string lStrPath = PathUtilities.GetCurrent("ModalForms") + "\\" + pStrFrmName + ".xml";

            lObjXmlDoc.Load(lStrPath);

            SAPbouiCOM.FormCreationParams lObjCreationPackage =
                (SAPbouiCOM.FormCreationParams)Application.SBO_Application.CreateObject
                    (SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);


            lObjCreationPackage.XmlData = lObjXmlDoc.InnerXml;

            if (pStrFrmName.Equals(pStrFrmName))
            {
                if (!lObjUtility.FormExists(pStrFrmName))
                {
                    lObjCreationPackage.UniqueID    = pStrFrmName;
                    lObjCreationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
                    lObjCreationPackage.Modality    = SAPbouiCOM.BoFormModality.fm_Modal;
                    lObjCreationPackage.FormType    = pStrFrmName;

                    lObjModalForm         = Application.SBO_Application.Forms.AddEx(lObjCreationPackage);
                    lObjModalForm.Title   = "Busqueda de rutas";
                    lObjModalForm.Left    = 400;
                    lObjModalForm.Top     = 100;
                    lObjModalForm.Mode    = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                    lObjModalForm.Visible = true;
                    InitializeXmlForm();
                }
            }
            else
            {
                lObjModalForm.Select();
            }
        }
Пример #11
0
        private void LoadFormXml(string FileName, string FormName)
        {
            System.Xml.XmlDocument oXmlDoc = new System.Xml.XmlDocument();
            string sPath = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]).ToString();

            oXmlDoc.Load(sPath + "\\" + FileName);

            SAPbouiCOM.FormCreationParams creationPackage = (SAPbouiCOM.FormCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject
                                                                (SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);

            creationPackage.XmlData = oXmlDoc.InnerXml;

            if (FormName.Equals("FormXmlArticle") || FormName.Equals("FormXmlService"))
            {
                creationPackage.UniqueID    = FormName;
                creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
                creationPackage.Modality    = SAPbouiCOM.BoFormModality.fm_Modal;
                if (FormName.Equals("FormXmlArticle"))
                {
                    creationPackage.FormType = "FormXmlArticle";
                }
                else if (FormName.Equals("FormXmlService"))
                {
                    creationPackage.FormType = "FormXmlService";
                }
                //creationPackage.

                lObjFormXml         = SAPbouiCOM.Framework.Application.SBO_Application.Forms.AddEx(creationPackage);
                lObjFormXml.Title   = "Importación XML";
                lObjFormXml.Left    = 400;
                lObjFormXml.Top     = 100;
                lObjFormXml.Mode    = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                lObjFormXml.Visible = true;
                initFormXml();
            }
        }
Пример #12
0
        public static SAPbouiCOM.FormCreationParams LoadFromXml(string pName)
        {
            XmlDocument lObjXmlDoc = new XmlDocument();

            Type lObjBaseType = typeof(Program);

            if (lObjBaseType.Assembly.IsDynamic)
            {
                lObjBaseType = lObjBaseType.BaseType;
            }

            string lStrNamespace = lObjBaseType.Namespace;
            string lStrPath      = lStrNamespace + ".XmlForms." + pName + ".xml";
            string lStrContent   = "";

            using (var lObjStream = lObjBaseType.Assembly.GetManifestResourceStream(lStrPath))
            {
                if (lObjStream != null)
                {
                    using (var lObjStreamReader = new StreamReader(lObjStream))
                    {
                        lStrContent = lObjStreamReader.ReadToEnd();
                    }
                }
            }

            lObjXmlDoc.LoadXml(lStrContent);

            SAPbouiCOM.FormCreationParams lObjCreationPackage = (SAPbouiCOM.FormCreationParams)Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams);
            lObjCreationPackage.XmlData  = lObjXmlDoc.InnerXml;
            lObjCreationPackage.UniqueID = pName;
            lObjCreationPackage.Modality = SAPbouiCOM.BoFormModality.fm_Modal;
            lObjCreationPackage.FormType = pName;

            return(lObjCreationPackage);
        }
Пример #13
0
    private void CreateRBillingForm()
    {
        try
        {
            ManualScan = "0";
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;
            //SAPbouiCOM.StaticText oStaticText = null;
            // SAPbouiCOM.EditText oEditText = null;
            //SAPbouiCOM.ComboBox oComboBox = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formRBilling;

            oCreationParams.UniqueID = formRBilling;
            try
            {
                oRBillingForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oRBillingForm = SBO_Application.Forms.Item(formRBilling);
            }

            // set the form properties
            oRBillingForm.Title        = "eBizCharge Recurring Billing";
            oRBillingForm.Left         = 400;
            oRBillingForm.Top          = 100;
            oRBillingForm.ClientHeight = 460;
            oRBillingForm.ClientWidth  = 975;



            //************************
            // Adding a Rectangle
            //***********************
            int margin = 5;
            oItem        = oRBillingForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE);
            oItem.Left   = margin;
            oItem.Width  = oRBillingForm.ClientWidth - 2 * margin;
            oItem.Top    = margin;
            oItem.Height = oRBillingForm.ClientHeight - 40;

            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;


            oItem        = oRBillingForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oRBillingForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Refresh";
            left           += span;

            oItem        = oRBillingForm.Items.Add(btnAdd, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oRBillingForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Add";
            left           += span;

            oItem        = oRBillingForm.Items.Add(btnRun, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oRBillingForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Run";

            left += span;

            oItem        = oRBillingForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oRBillingForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            margin = 8;
            int top  = 15;
            int edL  = 150; //oItm.Left + oItm.Width;
            int edW  = 100;
            int edH  = 15;
            int nGap = 26;

            oItem = addPaneItem(oRBillingForm, editCustomerID, edL, top, edW, edH, "Customer ID:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1000);
            oItem = addPaneItem(oRBillingForm, cbCustomerID, edL + 110, top, edW, edH, "", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1000);

            oItem        = oRBillingForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = edL + 220;
            oItem.Width  = wBtn;
            oItem.Top    = top - 2;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Find";

            top = oItem.Top + nGap;


            oItem          = oRBillingForm.Items.Add(matrixRBilling, SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oItem.FromPane = 0;
            oItem.ToPane   = 0;
            oItem.Left     = 5 + margin;
            oItem.Width    = oRBillingForm.ClientWidth - 2 * margin - 10;
            oItem.Top      = top;
            oItem.Height   = oRBillingForm.ClientHeight - 100;
            top            = oItem.Height + oItem.Top + 2;
            SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oRBillingForm.Items.Item(matrixRBilling).Specific;
            SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("jobID", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "ID";
            oColumn.Width = 20;
            oColumn       = oMatrix.Columns.Add("CustName", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Name";
            oColumn.Width = 50;
            oColumn       = oMatrix.Columns.Add("CustomerID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Customer";
            oColumn.Width = 80;
            SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString();

            oColumn = oMatrix.Columns.Add("InvID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Invoice";
            btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString();
            oColumn.Width        = 40;

            oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Order";
            btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString();
            oColumn.Width        = 40;

            oColumn = oMatrix.Columns.Add("Frequency", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Frequency";
            oColumn.Width = 50;

            oColumn = oMatrix.Columns.Add("StartDate", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Start Date";
            oColumn.Width = 50;

            oColumn = oMatrix.Columns.Add("EndDate", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "End Date";
            oColumn.Width = 50;

            /*
             *  oColumn = oMatrix.Columns.Add("CancelDate", SAPbouiCOM.BoFormItemTypes.it_EDIT);
             *  oColumn.TitleObject.Caption = "Cancel Date";
             *  oColumn.Width =50;
             */
            oColumn = oMatrix.Columns.Add("NextRun", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Next Run";
            oColumn.Width = 50;

            oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Amount";
            oColumn.Width = 50;


            oColumn = oMatrix.Columns.Add("Desc", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Description";
            oColumn.Width = 200;
            oColumn       = oMatrix.Columns.Add("LastRun", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Last Run";
            oColumn.Width = 50;
            oColumn       = oMatrix.Columns.Add("Result", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Result";
            oColumn.Width = 200;
            populateRBillingMatrix();
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
        oRBillingForm.Visible = true;
    }
Пример #14
0
    private void CreateePaymentFormForm()
    {
        try
        {
            ManualScan = "0";
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;
            //SAPbouiCOM.StaticText oStaticText = null;
            // SAPbouiCOM.EditText oEditText = null;
            //SAPbouiCOM.ComboBox oComboBox = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formePaymentForm;

            oCreationParams.UniqueID = formePaymentForm;
            try
            {
                oePaymentFormForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oePaymentFormForm = SBO_Application.Forms.Item(formePaymentForm);
            }

            // set the form properties
            oePaymentFormForm.Title        = "eBizCharge ePayment Form";
            oePaymentFormForm.Left         = 400;
            oePaymentFormForm.Top          = 100;
            oePaymentFormForm.ClientHeight = 460;
            oePaymentFormForm.ClientWidth  = 900;



            //************************
            // Adding a Rectangle
            //***********************
            int margin = 5;
            oItem        = oePaymentFormForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE);
            oItem.Left   = margin;
            oItem.Width  = oePaymentFormForm.ClientWidth - 2 * margin;
            oItem.Top    = margin;
            oItem.Height = oePaymentFormForm.ClientHeight - 40;

            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;


            oItem        = oePaymentFormForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oePaymentFormForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Refresh";
            left           += span;

            oItem        = oePaymentFormForm.Items.Add(btnAdd, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oePaymentFormForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Send All";
            left           += span;

            /*
             * oItem = oePaymentFormForm.Items.Add(btnRun, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
             * oItem.Left = left;
             * oItem.Width = wBtn;
             * oItem.Top = oePaymentFormForm.ClientHeight - nTopGap;
             * oItem.Height = hBtn;
             *
             * oButton = ((SAPbouiCOM.Button)(oItem.Specific));
             *
             * oButton.Caption = "Run";
             *
             * left += span;
             */
            oItem        = oePaymentFormForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oePaymentFormForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            margin = 8;
            int top  = 15;
            int edL  = 100; //oItm.Left + oItm.Width;
            int edW  = 100;
            int edH  = 15;
            int nGap = 26;

            oItem = addPaneItem(oePaymentFormForm, editCustomerID, edL, top, edW, edH, "Customer ID:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1000, 80);
            oItem = addPaneItem(oePaymentFormForm, cbCustomerID, edL + 110, top, edW, edH, "", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1000);

            oItem        = oePaymentFormForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = edL + 220;
            oItem.Width  = wBtn;
            oItem.Top    = top - 2;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Find";

            oItem = addPaneItem(oePaymentFormForm, cbGroup, edL + 400, top, edW, edH, "Customer Group", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1030);

            SAPbouiCOM.ComboBox oCB = (SAPbouiCOM.ComboBox)oItem.Specific;
            ComboAddItem(oCB, "");
            ComboAddItem(oCB, "All");
            List <string> list = GetGroupNames();
            foreach (string c in list)
            {
                ComboAddItem(oCB, c);
            }
            oItem = addPaneItem(oePaymentFormForm, cbEMTemplate, edL + 640, top, edW, edH, "Email Template", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 1060);
            oCB   = (SAPbouiCOM.ComboBox)oItem.Specific;
            foreach (string s in ListEmailTemplate)
            {
                ComboAddItem(oCB, s);
            }
            string t = getDefaultEmailTemplate();
            if (t != "")
            {
                try
                {
                    oCB.Select(t);
                }catch (Exception)
                {
                    try
                    {
                        oCB.Select(0);
                    }
                    catch (Exception) { };
                }
            }
            else
            {
                try
                {
                    oCB.Select(0);
                }
                catch (Exception) { };
            }
            top = oItem.Top + nGap;


            oItem          = oePaymentFormForm.Items.Add(matrixePaymentForm, SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oItem.FromPane = 0;
            oItem.ToPane   = 0;
            oItem.Left     = 5 + margin;
            oItem.Width    = oePaymentFormForm.ClientWidth - 2 * margin - 10;
            oItem.Top      = top;
            oItem.Height   = oePaymentFormForm.ClientHeight - 100;
            top            = oItem.Height + oItem.Top + 2;
            SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oePaymentFormForm.Items.Item(matrixePaymentForm).Specific;
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("DocNum", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Invoice No.";
            oColumn.Width = 80;
            oColumn       = oMatrix.Columns.Add("Status", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Status";
            oColumn.Width = 80;

            oColumn = oMatrix.Columns.Add("CustID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Customer";
            oColumn.Width = 80;
            SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString();

            oColumn = oMatrix.Columns.Add("CName", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Customer Name";
            oColumn.Width = 80;
            oColumn       = oMatrix.Columns.Add("E_Mail", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "EMail";
            oColumn.Width = 80;

            oColumn = oMatrix.Columns.Add("InvID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Origin No.";
            btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString();
            oColumn.Width        = 80;



            oColumn = oMatrix.Columns.Add("UploadDT", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Sent Date";
            oColumn.Width = 80;

            oColumn = oMatrix.Columns.Add("PaidDT", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Payment Date";
            oColumn.Width = 80;

            oColumn = oMatrix.Columns.Add("Balance", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Balance";
            oColumn.Width = 80;
            oColumn       = oMatrix.Columns.Add("UpBal", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Balance Sented";
            oColumn.Width = 80;
            oColumn       = oMatrix.Columns.Add("AmtPaid", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Last ePayment";
            oColumn.Width = 80;
            // populateePaymentFormMatrix();
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
        oePaymentFormForm.Visible = true;
    }
Пример #15
0
        private void CreateForm()
        {
            SAPbouiCOM.FormCreationParams oCP = null;
            SAPbouiCOM.Item       oItem       = null;
            SAPbouiCOM.StaticText oStatic     = null;
            SAPbouiCOM.Button     oButton     = null;
            SAPbouiCOM.EditText   oEdit       = null;

            //  Setting the form creation params
            oCP             = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));
            oCP.UniqueID    = "CFL1";
            oCP.FormType    = "CFL1";
            oCP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable;


            //  Adding the form
            oForm       = SBO_Application.Forms.AddEx(oCP);
            oForm.Title = "Choose From List Demo";

            //  Adding a User Data Source
            oForm.DataSources.UserDataSources.Add("EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);

            AddChooseFromList();

            //  Adding a text box
            oItem        = oForm.Items.Add("EditTxt", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oItem.Left   = 120;
            oItem.Top    = 90;
            oItem.LinkTo = "StaticTxt";
            oEdit        = ((SAPbouiCOM.EditText)(oItem.Specific));

            //  Adding a static text - Customer
            oItem           = oForm.Items.Add("StaticTxt", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 90;
            oItem.LinkTo    = "EditTxt";
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "Customer";

            //  Adding a static texts - Explenation
            oItem           = oForm.Items.Add("Explain", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 10;
            oItem.Width     = 200;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "There are 2 Choose From List OBjects here";

            oItem           = oForm.Items.Add("Explain1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 25;
            oItem.Width     = 300;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "One is activated by pressing TAB in the Edit box,";

            oItem           = oForm.Items.Add("Explain2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 40;
            oItem.Width     = 300;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "it Shows Only 'Customer' type Business Partners.";

            oItem           = oForm.Items.Add("Explain3", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 55;
            oItem.Width     = 300;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "The other is activated by the button,";

            oItem           = oForm.Items.Add("Explain4", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 70;
            oItem.Width     = 300;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "it shows all Business Partners";

            //  Adding a CFL button
            oItem         = oForm.Items.Add("Button", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left    = 198;
            oItem.Top     = 88;
            oButton       = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Type  = SAPbouiCOM.BoButtonTypes.bt_Image;
            oItem.Width   = 20;
            oItem.Height  = 20;
            oButton.Image = System.IO.Directory.GetParent(System.IO.Directory.GetParent(Application.StartupPath).ToString()) + @"\CFL.BMP";

            //  Adding Choose From List
            oEdit.DataBind.SetBound(true, "", "EditDS");

            //  Adding 2 Choose From List Object, ONE FOR EDIT TEXT AND ONE FOR BUTTON.
            oEdit.ChooseFromListUID = "CFL1";

            // We set the alias only after the UID is set, the alias is the field in the database
            // It compares the value in the edit text and narrows the CFL accrodingly
            oEdit.ChooseFromListAlias = "CardCode";

            oButton.ChooseFromListUID = "CFL2";

            oForm.Width  = 300;
            oForm.Height = 150;

            oForm.Visible = true;
        }
    private void CreatePayOnTermForm()
    {
        try
        {
            ManualScan = "0";
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;
            //SAPbouiCOM.StaticText oStaticText = null;
            // SAPbouiCOM.EditText oEditText = null;
            //SAPbouiCOM.ComboBox oComboBox = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formPayOnTerm;

            oCreationParams.UniqueID = formPayOnTerm;
            try
            {
                oPayOnTermForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oPayOnTermForm = SBO_Application.Forms.Item(formPayOnTerm);
            }

            // set the form properties
            oPayOnTermForm.Title        = "eBizCharge Batch Invoicing for Preauth";
            oPayOnTermForm.Left         = 400;
            oPayOnTermForm.Top          = 100;
            oPayOnTermForm.ClientHeight = 460;
            oPayOnTermForm.ClientWidth  = 750;



            //************************
            // Adding a Rectangle
            //***********************
            int margin = 5;
            oItem        = oPayOnTermForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE);
            oItem.Left   = margin;
            oItem.Width  = oPayOnTermForm.ClientWidth - 2 * margin;
            oItem.Top    = margin;
            oItem.Height = oPayOnTermForm.ClientHeight - 40;

            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;
            if (cfgBatchAutoMode == "Y")
            {
                oItem        = oPayOnTermForm.Items.Add(btnRefresh, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                oItem.Left   = left;
                oItem.Width  = wBtn;
                oItem.Top    = oPayOnTermForm.ClientHeight - nTopGap;
                oItem.Height = hBtn;

                oButton = ((SAPbouiCOM.Button)(oItem.Specific));

                oButton.Caption = "Orders";
                left           += span;
            }
            oItem        = oPayOnTermForm.Items.Add(btnInvoice, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oPayOnTermForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Process";
            left           += span;

            oItem        = oPayOnTermForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oPayOnTermForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            margin = 8;
            int top  = 15;
            int edL  = 150; //oItm.Left + oItm.Width;
            int edW  = 100;
            int edH  = 15;
            int nGap = 26;

            if (cfgBatchAutoMode == "Y")
            {
                oItem = addPaneItem(oPayOnTermForm, editStartDate, edL, top, edW, edH, "Start Date:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1);
            }
            else
            {
                oItem = addPaneItem(oPayOnTermForm, editStartDate, edL, top, edW, edH, "Delivery Note:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1);
            }

            /*
             * oItem = oPayOnTermForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
             * oItem.Left = edL + 120;
             * oItem.Width = wBtn;
             * oItem.Top = top - 2;
             * oItem.Height = hBtn;
             *
             * oButton = ((SAPbouiCOM.Button)(oItem.Specific));
             *
             * if (cfgBatchAutoMode == "Y")
             *  oButton.Caption = "Report";
             * else
             *  oButton.Caption = "Scan";
             */
            // oItem = addPaneItem(oPayOnTermForm, editEndDate, edL + 400, top, edW, edH, "Invoice Date:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 99);


            top = oItem.Top + nGap;

            oItem          = oPayOnTermForm.Items.Add(matrixPayOnTerm, SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oItem.FromPane = 0;
            oItem.ToPane   = 0;
            oItem.Left     = 5 + margin;
            oItem.Width    = oPayOnTermForm.ClientWidth - 2 * margin - 10;
            oItem.Top      = top;
            oItem.Height   = oPayOnTermForm.ClientHeight - 100;
            top            = oItem.Height + oItem.Top + 2;
            SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oPayOnTermForm.Items.Item(matrixPayOnTerm).Specific;
            SAPbouiCOM.Column oColumn = oMatrix.Columns.Add("RefNum", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Auth Code";
            oColumn.Width = 50;
            oColumn       = oMatrix.Columns.Add("InvoiceID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Invoice";
            SAPbouiCOM.LinkedButton btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Invoice).ToString();
            oColumn.Width        = 40;

            oColumn = oMatrix.Columns.Add("DeliveryID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Delivery";
            btn = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_DeliveryNotes).ToString();
            oColumn.Width        = 40;

            oColumn = oMatrix.Columns.Add("DeliveryNo", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Delivery No.";
            oColumn.Width = 80;

            oColumn = oMatrix.Columns.Add("OrderID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Order";
            oColumn.Width        = 40;
            btn                  = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_Order).ToString();


            oColumn = oMatrix.Columns.Add("customerID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Customer";
            oColumn.Width        = 40;
            btn                  = (SAPbouiCOM.LinkedButton)oColumn.ExtendedObject;
            btn.LinkedObjectType = ((int)SAPbouiCOM.BoLinkedObject.lf_BusinessPartner).ToString();

            oColumn = oMatrix.Columns.Add("CardHolder", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Name";
            oColumn.Width = 100;

            oColumn = oMatrix.Columns.Add("Amount", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Amount";
            oColumn.Width = 50;


            oColumn = oMatrix.Columns.Add("avsResult", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "AVS";
            oColumn.Width = 200;
            oColumn       = oMatrix.Columns.Add("Result", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Result";
            oColumn.Width = 200;

            /*
             * oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
             * DateTime dt = getLastBatchDate();
             *
             * if (dt < DateTime.Parse("01/01/2000"))
             *  dt = DateTime.Today.AddDays(-3);
             */
            // if(cfgBatchAutoMode=="Y")
            setFormEditVal(oPayOnTermForm, editStartDate, DateTime.Today.AddDays(-15).ToString("MM/dd/yyyy"));

            populatePayOnTermMatrix(false);
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
        oPayOnTermForm.Visible = true;
    }
        private void CreateMySimpleForm()
        {
            SAPbouiCOM.Item       oItem       = null;
            SAPbouiCOM.Button     oButton     = null;
            SAPbouiCOM.StaticText oStaticText = null;
            SAPbouiCOM.EditText   oEditText   = null;
            SAPbouiCOM.ComboBox   oComboBox   = null;


            //adicionar novo form
            SAPbouiCOM.FormCreationParams oCreationParams = null;
            oCreationParams             = ((SAPbouiCOM.FormCreationParams)(oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.UniqueID    = "MeuFormSimples";

            oForm = oApplication.Forms.AddEx(oCreationParams);
            oForm.DataSources.UserDataSources.Add("EditSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20);
            oForm.DataSources.UserDataSources.Add("CombSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20);

            //setar as propriedades do form
            oForm.Title        = "Formulário Simples Herbert";
            oForm.Left         = 400;
            oForm.Top          = 100;
            oForm.ClientHeight = 80;
            oForm.ClientWidth  = 350;

            // add o botão ok
            oItem           = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = 0;
            oItem.Width     = 65;
            oItem.Top       = 52;
            oItem.Height    = 19;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "OK";

            // add botão cancelar
            oItem           = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = 70;
            oItem.Width     = 65;
            oItem.Top       = 52;
            oItem.Height    = 19;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "Cancel";

            //adicionar retangulo
            oItem        = oForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE);
            oItem.Left   = 0;
            oItem.Width  = 344;
            oItem.Top    = 1;
            oItem.Height = 49;

            // adicionar label
            oItem               = oForm.Items.Add("SaticTxt1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left          = 7;
            oItem.Width         = 148;
            oItem.Top           = 8;
            oItem.Height        = 14;
            oItem.LinkTo        = "EditText1";
            oStaticText         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStaticText.Caption = "Static Text 1";

            //adicionar outro label
            oItem               = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left          = 7;
            oItem.Width         = 148;
            oItem.Top           = 24;
            oItem.Height        = 14;
            oItem.LinkTo        = "ComboBox1";
            oStaticText         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStaticText.Caption = "Static Text 1";

            //adicionar Edit Text
            oItem        = oForm.Items.Add("EditText1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oItem.Left   = 157;
            oItem.Width  = 163;
            oItem.Top    = 8;
            oItem.Height = 14;
            oEditText    = ((SAPbouiCOM.EditText)(oItem.Specific));
            oEditText.DataBind.SetBound(true, "", "EditSource");
            oEditText.String = "Edit Text 1";

            //adicionar Combo Box
            oItem        = oForm.Items.Add("ComboBox1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oItem.Left   = 157;
            oItem.Width  = 163;
            oItem.Top    = 24;
            oItem.Height = 14;

            oItem.DisplayDesc = true;

            oComboBox = ((SAPbouiCOM.ComboBox)(oItem.Specific));

            oComboBox.DataBind.SetBound(true, "", "CombSource");


            oComboBox.ValidValues.Add("0", "Selecione");
            oComboBox.ValidValues.Add("1", "Combo Value 1");
            oComboBox.ValidValues.Add("2", "Combo Value 2");
            oComboBox.ValidValues.Add("3", "Combo Value 3");
            oComboBox.Select("0", SAPbouiCOM.BoSearchKey.psk_ByValue);
        }
Пример #18
0
    private void CreateJobForm()
    {
        try
        {
            try {
                oJobForm = SBO_Application.Forms.Item(formJob);
                oJobForm.Close();
            }catch(Exception)
            { }
            SAPbouiCOM.Item oItem = null;
            SAPbouiCOM.Button oButton = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType = formJob;
            oCreationParams.UniqueID = formJob;
            try
            {
                oJobForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception ex)
            {
                oJobForm = SBO_Application.Forms.Item(formJob);
                errorLog(ex);

            }
            // set the form properties
            try
            {
            oJobForm.Title = "eBizCharge Recurring Billing Setup Form";
            oJobForm.Left = 400;
            oJobForm.Top = 100;
            oJobForm.ClientHeight = 300;
            oJobForm.ClientWidth = 500;
            int buttonTop = 270;
            int buttonLeft = 60;
            int buttonWidth = 65;
            int buttonHeight = 19;

            oItem = oJobForm.Items.Add(btnUpdate, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left = buttonLeft;
            oItem.Width = buttonWidth;
            oItem.Top = buttonTop;
            oItem.Height = buttonHeight;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));
            if (JobID != "")
                oButton.Caption = "Update";
            else
                oButton.Caption = "Add";

            //************************
            // Adding a Cancel button
            //***********************

                oItem = oJobForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                oItem.Left = buttonLeft + buttonWidth + 5;
                oItem.Width = buttonWidth;
                oItem.Top = buttonTop;
                oItem.Height = buttonHeight;

                oButton = ((SAPbouiCOM.Button)(oItem.Specific));

                oButton.Caption = "Cancel";
            }
            catch (Exception) { }
            AddJobFormField(oJobForm);

            oJobForm.Visible = true;
            setFormEditVal(oJobForm, editStartDate, DateTime.Today.ToString("MM/dd/yyyy"));
            setFormEditVal(oJobForm, editEndDate, DateTime.Today.AddYears(1).ToString("MM/dd/yyyy"));
            setLabelCaption(oJobForm, stOrderID, JobOrderID);
            setFormEditVal(oJobForm, editDescription, strJobDesc);

        }
        catch (Exception ex)
        {

            errorLog(ex);
        }finally
        {
            populateData();

        }
    }
    private void CreateCustImpForm()
    {
        try
        {
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formCustImp;

            oCreationParams.UniqueID = formCustImp;
            try
            {
                oCustImpForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oCustImpForm = SBO_Application.Forms.Item(formCustImp);
            }

            // set the form properties
            oCustImpForm.Title        = "eBizCharge Payment Method Import";
            oCustImpForm.Left         = 400;
            oCustImpForm.Top          = 100;
            oCustImpForm.ClientHeight = 260;
            oCustImpForm.ClientWidth  = 450;



            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;

            oItem        = oCustImpForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oCustImpForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Find";
            left           += span;
            oItem           = oCustImpForm.Items.Add(btnImp, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = left;
            oItem.Width     = wBtn;
            oItem.Top       = oCustImpForm.ClientHeight - nTopGap;
            oItem.Height    = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Import";
            left           += span;
            oItem           = oCustImpForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = left;
            oItem.Width     = wBtn;
            oItem.Top       = oCustImpForm.ClientHeight - nTopGap;
            oItem.Height    = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            int margin = 8;
            int top    = 15;
            int edL    = 150; //oItm.Left + oItm.Width;
            int edW    = 200;
            int edH    = 15;
            int nGap   = 26;

            oItem = addPaneItem(oCustImpForm, editCustNum, edL, top, edW, edH, "Gateway Cardholder:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 100);


            top = oItem.Top + nGap;

            oItem = addPaneItem(oCustImpForm, cbPaymentMethod, edL, top, edW, edH, "Payment Method:", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 200);

            top = oItem.Top + nGap;

            oItem = addPaneItem(oCustImpForm, cbCustomerID, edL, top, edW, edH, "Import to:", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 201);

            List <String> list = FindCustomer("");

            SAPbouiCOM.ComboBox oCB = (SAPbouiCOM.ComboBox)oCustImpForm.Items.Item(cbCustomerID).Specific;
            try
            {
                while (oCB.ValidValues.Count > 0)
                {
                    oCB.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index);
                }
            }
            catch (Exception)
            { }

            foreach (string c in list)
            {
                ComboAddItem(oCB, c);
            }
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
        oCustImpForm.Visible = true;
    }
Пример #20
0
    private void CreateSetupForm()
    {
        try
        {
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;
            //SAPbouiCOM.StaticText oStaticText = null;
            // SAPbouiCOM.EditText oEditText = null;
            //SAPbouiCOM.ComboBox oComboBox = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formSetup;

            oCreationParams.UniqueID = formSetup;
            try
            {
                oSetupForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oSetupForm = SBO_Application.Forms.Item(formSetup);

                oSetupForm.Visible = true;
            }
            trace("Create Setup Form. ");

            // set the form properties
            oSetupForm.Title        = "eBizCharge Setup";
            oSetupForm.Left         = 400;
            oSetupForm.Top          = 100;
            oSetupForm.ClientHeight = 460;
            oSetupForm.ClientWidth  = 450;

            //************************
            // Adding a Rectangle
            //***********************
            int margin = 5;
            oItem        = oSetupForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE);
            oItem.Left   = margin;
            oItem.Width  = oSetupForm.ClientWidth - 2 * margin;
            oItem.Top    = margin;
            oItem.Height = oSetupForm.ClientHeight - 40;

            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;

            oItem        = oSetupForm.Items.Add(btnProcess, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oSetupForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "Update";
            left            = oItem.Left + wBtn + 10;
            oItem           = oSetupForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = left;
            oItem.Width     = wBtn;
            oItem.Top       = oSetupForm.ClientHeight - nTopGap;
            oItem.Height    = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            int edL  = 110 + 15; //oItm.Left + oItm.Width;
            int edW  = 250;
            int edT  = 30;
            int edH  = 15;
            int nGap = 22;
            int lbw  = 100;

            oItem = addPaneItem(oSetupForm, editDBUser, edL, edT, edW, edH, "DB user name:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 1, lbw);
            edT   = oItem.Top + nGap;
            oItem = addPaneItem(oSetupForm, editDBPasswd, edL, edT, edW, edH, "DB user password:"******"B1 user name:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 3, lbw);
            edT   = oItem.Top + nGap;
            oItem = addPaneItem(oSetupForm, editAppPasswd, edL, edT, edW, edH, "B1 user password:"******"")
            {
                B1Info.AppUser = oCompany.UserName;
            }
            setFormEditVal(oSetupForm, editAppUser, B1Info.AppUser);
            setFormEditVal(oSetupForm, editAppPasswd, passwdMask);
            setFormEditVal(oSetupForm, editDBUser, B1Info.DBUser);
            setFormEditVal(oSetupForm, editDBPasswd, passwdMask);
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }

        oSetupForm.Visible = true;
    }
    private void CreateCreditCardForm()
    {
        try
        {
            beBizChargeClicked = false;
            CFCustID           = getCustomerID();
            if (CFCustID == "")
            {
                SBO_Application.MessageBox("Please select a customer first");
                return;
            }
            try
            {
                oCreditForm = SBO_Application.Forms.Item(formCredit);
                oCreditForm.Close();
            }catch (Exception)
            { }

            // add a new form
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formCredit;
            oCreationParams.UniqueID    = formCredit;
            try
            {
                oCreditForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception ex)
            {
                errorLog(ex);
                oCreditForm = SBO_Application.Forms.Item(formCredit);
            }
            SAPbouiCOM.Item oRefItm    = null;
            SAPbouiCOM.Item oRefBtnItm = null;
            if (theActiveForm.TypeEx != FORMINCOMINGPAYMENT)
            {
                oRefItm = theActiveForm.Items.Item("4");
            }
            else
            {
                oRefItm = theActiveForm.Items.Item("5");
            }
            oRefBtnItm = theActiveForm.Items.Item("1");
            // set the form properties
            oCreditForm.Title        = "eBizCharge Credit Card Form";
            oCreditForm.Left         = 400;
            oCreditForm.Top          = 100;
            oCreditForm.ClientHeight = oRefItm.Height * 35;
            oCreditForm.ClientWidth  = oRefItm.Width * 4;

            int buttonTop = oCreditForm.ClientHeight - oRefItm.Height * 2;
            oItem        = oCreditForm.Items.Add(btnProcess, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = 6;
            oItem.Width  = oRefBtnItm.Width;
            oItem.Top    = buttonTop;
            oItem.Height = oRefBtnItm.Height;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Credit";

            //************************
            // Adding a Cancel button
            //***********************

            oItem        = oCreditForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = 6 + oRefBtnItm.Width + 2;
            oItem.Width  = oRefBtnItm.Width;
            oItem.Top    = buttonTop;
            oItem.Height = oRefBtnItm.Height;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";
            if (cfgHasTerminal == "Y")
            {
                oItem        = oCreditForm.Items.Add(btnTerminal, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                oItem.Left   = oCreditForm.Items.Item(btnClose).Left + oCreditForm.Items.Item(btnClose).Width + 10;
                oItem.Width  = oCreditForm.Items.Item(btnClose).Width;
                oItem.Top    = oCreditForm.Items.Item(btnClose).Top;
                oItem.Height = oCreditForm.Items.Item(btnClose).Height;
                setButtonCaption(oCreditForm, btnTerminal, "Terminal");
            }
            AddCCPMFormField(oCreditForm, panePM, true);
            setLabelCaption(oCreditForm, stRecordID, getFormItemVal(theActiveForm, fidRecordID));
            oCreditForm.Visible = true;
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
    }
Пример #22
0
    private void CreateCustImpForm()
    {
        try
        {
            SAPbouiCOM.Item   oItem   = null;
            SAPbouiCOM.Button oButton = null;

            // add a new form
            SAPbouiCOM.FormCreationParams oCreationParams = null;

            oCreationParams = ((SAPbouiCOM.FormCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));

            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.FormType    = formCustImp;

            oCreationParams.UniqueID = formCustImp;
            try
            {
                oCustImpForm = SBO_Application.Forms.AddEx(oCreationParams);
            }
            catch (Exception)
            {
                oCustImpForm = SBO_Application.Forms.Item(formCustImp);
            }

            // set the form properties
            oCustImpForm.Title        = "eBizCharge Payment Method Import";
            oCustImpForm.Left         = 400;
            oCustImpForm.Top          = 100;
            oCustImpForm.ClientHeight = 320;
            oCustImpForm.ClientWidth  = 550;



            int nTopGap = 25;
            int left    = 6;
            int wBtn    = 70;
            int hBtn    = 19;
            int span    = 80;

            oItem         = oCustImpForm.Items.Add(btnFind, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left    = left;
            oItem.Width   = wBtn;
            oItem.Top     = oCustImpForm.ClientHeight - nTopGap;
            oItem.Height  = hBtn;
            oItem.Visible = false;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Find";
            left           += span;
            oItem           = oCustImpForm.Items.Add(btnImp, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = left;
            oItem.Width     = wBtn;
            oItem.Top       = oCustImpForm.ClientHeight - nTopGap;
            oItem.Visible   = false;
            oItem.Height    = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Import";
            left           += span;

            oItem        = oCustImpForm.Items.Add(btnClose, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left   = left;
            oItem.Width  = wBtn;
            oItem.Top    = oCustImpForm.ClientHeight - nTopGap;
            oItem.Height = hBtn;

            oButton = ((SAPbouiCOM.Button)(oItem.Specific));

            oButton.Caption = "Cancel";

            int margin = 8;
            int top    = 15;
            int edL    = 200; //oItm.Left + oItm.Width;
            int edW    = 200;
            int edH    = 15;
            int nGap   = 26;

            /*
             *  List<String> list = FindCustomer("");
             *
             *      SAPbouiCOM.ComboBox oCB = (SAPbouiCOM.ComboBox)oCustImpForm.Items.Item(cbCustomerID).Specific;
             *      try
             *      {
             *          while (oCB.ValidValues.Count > 0)
             *              oCB.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index);
             *      }
             *      catch (Exception)
             *      { }
             *
             *      foreach (string c in list)
             *      {
             *          ComboAddItem(oCB, c);
             *      }
             */

            oItem       = addPaneItem(oCustImpForm, editFileName, edL, top, edW, edH, "Customer Import File(tab delimited):", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 2035, 200);
            oItem.Width = 240;
            int l = oItem.Left + oItem.Width + 10;
            oItem           = oCustImpForm.Items.Add(btnFImp, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = l;
            oItem.Width     = wBtn;
            oItem.Top       = top;
            oItem.Height    = hBtn - 2;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "File Import";
            top             = oItem.Top + nGap;
            oItem           = addPaneItem(oCustImpForm, editExpFileName, edL, top, edW, edH, "Exported Customer File(tab delimited):", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 2038, 200);
            oItem.Width     = 240;
            oItem           = oCustImpForm.Items.Add(btnExpFImp, SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = l;
            oItem.Width     = wBtn;
            oItem.Top       = top;
            oItem.Height    = hBtn - 2;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "File Import";
            top             = oItem.Top + nGap;
            oItem           = addPaneItem(oCustImpForm, editImportLog, edL, top, edW, edH, "import Log:", SAPbouiCOM.BoFormItemTypes.it_EXTEDIT, 0, 2036, 150);
            oItem.Height    = 80;
            oItem.Width     = 240;
            top             = oItem.Top + 120;
            oItem           = addPaneItem(oCustImpForm, editCustNum, edL, top, edW, edH, "Gateway cardholder ID:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 100, 150);
            oItem.Visible   = false;
            oCustImpForm.Items.Item("LB100").Visible = false;

            top = oItem.Top + nGap;

            oItem         = addPaneItem(oCustImpForm, cbPaymentMethod, edL, top, edW, edH, "Payment method(s) found:", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX, 0, 200, 150);
            oItem.Visible = false;
            oCustImpForm.Items.Item("LB200").Visible = false;


            top = oItem.Top + nGap;

            //   oItem = addPaneItem(oCustImpForm, cbUsePaymentName, edL, top, edW, edH, "Use Payment Name(Y/N):", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 2030);
            //   ((SAPbouiCOM.EditText)(oItem.Specific)).Value = "Y";
            //    top = oItem.Top + nGap;

            oItem         = addPaneItem(oCustImpForm, editCustomerID, edL, top, edW, edH, "Customer Id import to:", SAPbouiCOM.BoFormItemTypes.it_EDIT, 0, 204, 150);
            oItem.Visible = false;
            oCustImpForm.Items.Item("LB204").Visible = false;


            //   ((SAPbouiCOM.EditText)(oItem.Specific)).Value = "Y";
            //    top = oItem.Top + nGap;
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
        oCustImpForm.Visible = true;
    }