Exemplo n.º 1
0
        private void InitiallizeForm()
        {
            Program.objHrmsUI.loadSettings();

            oForm.Freeze(true);

            initiallizing = true;


            mtWO = (SAPbouiCOM.Matrix)oForm.Items.Item("mtWO").Specific;
            mtOD = (SAPbouiCOM.Matrix)oForm.Items.Item("mtOD").Specific;

            lblStatus = (SAPbouiCOM.StaticText)oForm.Items.Item("lblStatus").Specific;
            dtRDR1    = oForm.DataSources.DataTables.Item("dtRDR1");
            dtORDR    = oForm.DataSources.DataTables.Item("dtORDR");
            dtHead    = oForm.DataSources.DataTables.Item("dtHead");
            dtCard    = oForm.DataSources.DataTables.Item("dtCard");
            dtWebO    = oForm.DataSources.DataTables.Item("dtWebO");

            cbOS = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOS").Specific;
            cbOS.ValidValues.Add("01", "All");
            cbOS.ValidValues.Add("02", "Not Posted");
            cbOS.ValidValues.Add("03", "Posted");
            cbOS.Item.DisplayDesc = true;
            cbOS.Select("01", BoSearchKey.psk_ByValue);
            txCEmail  = (SAPbouiCOM.EditText)oForm.Items.Item("txCEmail").Specific;
            txCNCode  = (SAPbouiCOM.EditText)oForm.Items.Item("txCNCode").Specific;
            txCNTel   = (SAPbouiCOM.EditText)oForm.Items.Item("txCNTel").Specific;
            txCNEmail = (SAPbouiCOM.EditText)oForm.Items.Item("txCNEmail").Specific;
            txSName   = (SAPbouiCOM.EditText)oForm.Items.Item("txSName").Specific;
            txSSPO    = (SAPbouiCOM.EditText)oForm.Items.Item("txSSPO").Specific;
            txSCity   = (SAPbouiCOM.EditText)oForm.Items.Item("txSCity").Specific;
            txSState  = (SAPbouiCOM.EditText)oForm.Items.Item("txSState").Specific;
            txSZip    = (SAPbouiCOM.EditText)oForm.Items.Item("txSZip").Specific;
            txSPhone  = (SAPbouiCOM.EditText)oForm.Items.Item("txSPhone").Specific;
            txSEmail  = (SAPbouiCOM.EditText)oForm.Items.Item("txSEmail").Specific;

            txFrom = (SAPbouiCOM.EditText)oForm.Items.Item("txFrom").Specific;
            txTo   = (SAPbouiCOM.EditText)oForm.Items.Item("txTo").Specific;



            txCTel  = (SAPbouiCOM.EditText)oForm.Items.Item("txCTel").Specific;
            txCCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCCode").Specific;

            cbOS   = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOS").Specific;
            btPost = (SAPbouiCOM.Button)oForm.Items.Item("btPost").Specific;
            btGet  = (SAPbouiCOM.Button)oForm.Items.Item("btGet").Specific;
            //   ini_controls();

            dtHead.Rows.Add(1);

            string INCCard = Program.objHrmsUI.getSetting("LTDCODE").ToString();

            dtHead.SetValue("CardCode", 0, INCCard);
            oForm.PaneLevel = 1;
            oForm.Freeze(false);

            initiallizing = false;
        }
        private void AddItems(SAPbouiCOM.Form oFormPurchaseRequest)
        {
            SAPbouiCOM.Item       oCamposPurchaseRequest = null;
            SAPbouiCOM.Form       _oFormPurchaseRequest;
            SAPbouiCOM.StaticText oStaticText = null;
            SAPbouiCOM.Item       oItem;
            SAPbouiCOM.ComboBox   oComboBox = null;

            _oFormPurchaseRequest = oFormPurchaseRequest;

            //*******************************************
            // Se adiciona Label "Integrar Documento"
            //*******************************************

            oItem = _oFormPurchaseRequest.Items.Item("62");

            oCamposPurchaseRequest        = _oFormPurchaseRequest.Items.Add("blbID", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oCamposPurchaseRequest.Left   = oItem.Left + 10;
            oCamposPurchaseRequest.Width  = oItem.Width;
            oCamposPurchaseRequest.Top    = oItem.Top;
            oCamposPurchaseRequest.Height = oItem.Height;

            oCamposPurchaseRequest.LinkTo = "ComboBox1";

            oStaticText = ((SAPbouiCOM.StaticText)(oCamposPurchaseRequest.Specific));

            oStaticText.Caption = "Integrar Documento ?";

            oCamposPurchaseRequest.FromPane = 5;
            oCamposPurchaseRequest.ToPane   = 5;

            //*******************************************
            // Se adiciona Combo box "Integrar Documento"
            //*******************************************

            oCamposPurchaseRequest        = _oFormPurchaseRequest.Items.Add("ComboBox1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oCamposPurchaseRequest.Left   = oItem.Left + 120;
            oCamposPurchaseRequest.Width  = oItem.Width;
            oCamposPurchaseRequest.Top    = oItem.Top;
            oCamposPurchaseRequest.Height = oItem.Height;

            oCamposPurchaseRequest.DisplayDesc = true;

            _oFormPurchaseRequest.DataSources.UserDataSources.Add("CombSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20);

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


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

            oComboBox.ValidValues.Add("Y", "Si");
            oComboBox.ValidValues.Add("N", "No");

            oComboBox.Select("Y", BoSearchKey.psk_ByValue);

            oCamposPurchaseRequest.FromPane = 5;
            oCamposPurchaseRequest.ToPane   = 5;
        }
Exemplo n.º 3
0
        private void InitiallizeForm()
        {
            oForm.Freeze(true);
            dbOITM = oForm.DataSources.DBDataSources.Item("OITM");



            oItemRef = oForm.Items.Item("39");
            SAPbouiCOM.StaticText lblCode, lblName, lblInt;
            SAPbouiCOM.CheckBox   chkAll, chkMon, chkTue, chkWed, chkThs, chkFri, chkSat, chkSun;
            SAPbouiCOM.ComboBox   cbInt;
            SAPbouiCOM.EditText   txtCode, txtName;


            try
            {
                SAPbouiCOM.Item oItemRef1 = oForm.Items.Item("106");


                oItem         = oForm.Items.Add("B1_lbSub", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top     = oItemRef.Top;
                oItem.Height  = oItemRef.Height;
                oItem.Left    = oItemRef1.Left;
                oItem.Width   = oItemRef.Width + 40;
                oItem.Visible = true;
                B1_lbSub      = (SAPbouiCOM.StaticText)oItem.Specific;

                B1_lbSub.Caption = "Sub Group";

                oItemRef1 = oForm.Items.Item("107");

                oItem             = oForm.Items.Add("cbSubGroup", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Top         = oItemRef.Top;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef1.Left;
                oItem.Width       = oItemRef.Width + 90;
                oItem.Visible     = true;
                oItem.DisplayDesc = true;
                oItem.LinkTo      = "B1_lbSub";
                cbSubGroup        = (SAPbouiCOM.ComboBox)oItem.Specific;

                cbSubGroup.DataBind.SetBound(true, "OITM", "U_SubGrp");


                //   <databind>
                //    <DataTable UniqueId="dtHead" ColumnUID="RNN"/>
                //  </databind>
                //</specific>
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }

            oForm.Freeze(false);
            dsSAP = new DataServices(Program.strConSAP);
        }
Exemplo n.º 4
0
        private void CriarFormularioComMatrix()
        {
            SAPbouiCOM.Button     oButton     = null;
            SAPbouiCOM.StaticText oStaticText = null;
            SAPbouiCOM.EditText   oEditText   = null;

            SAPbouiCOM.FormCreationParams oCreationParams = null;
            oCreationParams = ((SAPbouiCOM.FormCreationParams)(oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)));
            //oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed;
            oCreationParams.UniqueID = "frmMtx";
            oCreationParams.FormType = "frmMtx";

            oForm = oApplication.Forms.AddEx(oCreationParams);

            oForm.Title        = "Matrix, DataSources and Linked Buttons";
            oForm.Left         = 336;
            oForm.ClientWidth  = 520;
            oForm.Top          = 44;
            oForm.ClientHeight = 200;


            oItem           = oForm.Items.Add("1 ", BoFormItemTypes.it_BUTTON);
            oItem.Left      = 5;
            oItem.Width     = 65;
            oItem.Top       = 170;
            oItem.Height    = 19;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "OK";

            oItem           = oForm.Items.Add("2 ", BoFormItemTypes.it_BUTTON);
            oItem.Left      = 75;
            oItem.Width     = 65;
            oItem.Top       = 170;
            oItem.Height    = 19;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "Cancel";

            oItem        = oForm.Items.Add("txtPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oItem.Left   = 265;
            oItem.Width  = 163;
            oItem.Top    = 172;
            oItem.Height = 14;

            oItem           = oForm.Items.Add("btnPhone ", BoFormItemTypes.it_BUTTON);
            oItem.Left      = 160;
            oItem.Width     = 100;
            oItem.Top       = 170;
            oItem.Height    = 19;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Caption = "Add Phone Prefix";

            this.oForm.Visible = true;

            AddMatrixNoForm();
        }
Exemplo n.º 5
0
        private void InitiallizeForm()
        {
            Program.objHrmsUI.loadSettings();
            Program.isDemo = Program.objHrmsUI.settings["IsDemo"].ToString() == "Y" ? true : false;


            oForm.Freeze(true);

            initiallizing = true;



            lblStatus = (SAPbouiCOM.StaticText)oForm.Items.Item("lblStatus").Specific;
            dtORDR    = oForm.DataSources.DataTables.Item("dtORDR");
            dtHead    = oForm.DataSources.DataTables.Item("dtHead");
            dtCard    = oForm.DataSources.DataTables.Item("dtCard");
            txWON     = (SAPbouiCOM.EditText)oForm.Items.Item("txWON").Specific;


            txSName  = (SAPbouiCOM.EditText)oForm.Items.Item("txSName").Specific;
            txSSPO   = (SAPbouiCOM.EditText)oForm.Items.Item("txSSPO").Specific;
            txSCity  = (SAPbouiCOM.EditText)oForm.Items.Item("txSCity").Specific;
            txSState = (SAPbouiCOM.EditText)oForm.Items.Item("txSState").Specific;
            txSZip   = (SAPbouiCOM.EditText)oForm.Items.Item("txSZip").Specific;
            txSPhone = (SAPbouiCOM.EditText)oForm.Items.Item("txSPhone").Specific;
            txSEmail = (SAPbouiCOM.EditText)oForm.Items.Item("txSEmail").Specific;

            SCompany = (SAPbouiCOM.EditText)oForm.Items.Item("txSComp").Specific;
            SAdd2    = (SAPbouiCOM.EditText)oForm.Items.Item("txSAdd2").Specific;
            SAdd1    = (SAPbouiCOM.EditText)oForm.Items.Item("txSAdd1").Specific;
            BCompany = (SAPbouiCOM.EditText)oForm.Items.Item("txBComp").Specific;
            BAdd2    = (SAPbouiCOM.EditText)oForm.Items.Item("txBAdd2").Specific;
            BAdd1    = (SAPbouiCOM.EditText)oForm.Items.Item("txBAdd1").Specific;

            txDD     = (SAPbouiCOM.EditText)oForm.Items.Item("txDD").Specific;
            txShipD  = (SAPbouiCOM.EditText)oForm.Items.Item("txShipD").Specific;
            txShipA  = (SAPbouiCOM.EditText)oForm.Items.Item("txShipA").Specific;
            txCustFN = (SAPbouiCOM.EditText)oForm.Items.Item("txCustFN").Specific;
            txCustLN = (SAPbouiCOM.EditText)oForm.Items.Item("txCustLN").Specific;
            txCustE  = (SAPbouiCOM.EditText)oForm.Items.Item("txCustE").Specific;
            txCustG  = (SAPbouiCOM.EditText)oForm.Items.Item("txCustG").Specific;
            txCustCG = (SAPbouiCOM.EditText)oForm.Items.Item("txCustCG").Specific;
            txStore  = (SAPbouiCOM.EditText)oForm.Items.Item("txStore").Specific;
            txCD     = (SAPbouiCOM.EditText)oForm.Items.Item("txCD").Specific;
            txSD     = (SAPbouiCOM.EditText)oForm.Items.Item("txSD").Specific;

            btGet = (SAPbouiCOM.Button)oForm.Items.Item("btGet").Specific;

            ini_controls();

            oForm.Freeze(false);

            initiallizing = false;
        }
        public static SAPbouiCOM.StaticText AddStaticTextAoFormulario(
            SAPbouiCOM.Form pForm
            , string pUID
            , int pLeft
            , int pWidth
            , int pTop
            , int pHeight
            , string pCaption
            , string pLinkTo       = ""
            , bool AffectsFormMode = false
            , int pFromPane        = 0
            , int pToPane          = 0
            )
        {
            Item oItem = pForm.Items.Add(pUID, BoFormItemTypes.it_STATIC);

            SAPbouiCOM.StaticText oStaticText = null;

            if (pLeft > 0)
            {
                oItem.Left = pLeft;
            }
            if (pWidth > 0)
            {
                oItem.Width = pWidth;
            }
            if (pTop > 0)
            {
                oItem.Top = pTop;
            }
            if (pHeight > 0)
            {
                oItem.Height = pHeight;
            }



            oItem.AffectsFormMode = AffectsFormMode;
            if (pFromPane > 0)
            {
                oItem.FromPane = pFromPane;
            }
            if (pToPane > 0)
            {
                oItem.ToPane = pToPane;
            }
            oStaticText         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStaticText.Caption = pCaption;

            return(oStaticText);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Crea el campo de RFC en la ventana de Datos maestros  empleado
        /// </summary>
        /// <param name="_oForm"></param>
        private void CrearCampoRFC(Form _oForm)
        {
            SAPbouiCOM.Item newItem = null;

            try
            {
                try
                {
                    string s = _oForm.Items.Item(TXT_RFC).UniqueID;
                }
                catch (Exception)
                {
                    _oForm.Freeze(true);

                    //LABEL RFC
                    SAPbouiCOM.Item _oLblTelOficina = null;
                    _oLblTelOficina  = _oForm.Items.Item(LBL_TELEFONO_OFICINA);
                    newItem          = _oForm.Items.Add(LBL_RFC, BoFormItemTypes.it_STATIC);
                    newItem.Left     = _oLblTelOficina.Left;
                    newItem.Top      = _oLblTelOficina.Top - 16;
                    newItem.Width    = 50;
                    newItem.ToPane   = 0;
                    newItem.FromPane = 0;
                    _oLblRfc         = newItem.Specific;
                    _oLblRfc.Caption = "RFC";

                    //EDITTEXT RFC
                    SAPbouiCOM.Item _oLabelRFC = null;
                    _oLabelRFC       = _oForm.Items.Item(LBL_RFC);
                    newItem          = _oForm.Items.Add(TXT_RFC, BoFormItemTypes.it_EDIT);
                    newItem.Left     = _oLabelRFC.Left + 102;
                    newItem.Top      = _oLabelRFC.Top;
                    newItem.Width    = 90;
                    newItem.ToPane   = 0;
                    newItem.FromPane = 0;
                    _oTxtRfc         = (SAPbouiCOM.EditText)newItem.Specific;
                    _oTxtRfc.DataBind.SetBound(true, "OHEM", "U_RFC");
                    _oLabelRFC.LinkTo = newItem.UniqueID;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error al crear campos de usuario *CrearCampoRFC* : " + ex.Message);
            }
            finally
            {
                _oForm.Freeze(false);
            }
        }
Exemplo n.º 8
0
 public override void OnInitializeComponent()
 {
     this.StaticText0           = ((SAPbouiCOM.StaticText)(this.GetItem("lb_pcode").Specific));
     this.EditText0             = ((SAPbouiCOM.EditText)(this.GetItem("txt_pcode").Specific));
     this.Button0               = ((SAPbouiCOM.Button)(this.GetItem("bt_info").Specific));
     this.Button0.PressedAfter += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button0_PressedAfter);
     this.StaticText1           = ((SAPbouiCOM.StaticText)(this.GetItem("lb_ptype").Specific));
     this.EditText1             = ((SAPbouiCOM.EditText)(this.GetItem("txt_ptype").Specific));
     this.StaticText2           = ((SAPbouiCOM.StaticText)(this.GetItem("lb_pname").Specific));
     this.EditText2             = ((SAPbouiCOM.EditText)(this.GetItem("txt_pname").Specific));
     this.Button1               = ((SAPbouiCOM.Button)(this.GetItem("bt_clone").Specific));
     this.Button1.PressedAfter += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button1_PressedAfter);
     this.StaticText3           = ((SAPbouiCOM.StaticText)(this.GetItem("lb_bpname").Specific));
     this.EditText3             = ((SAPbouiCOM.EditText)(this.GetItem("txt_bpname").Specific));
     this.StaticText4           = ((SAPbouiCOM.StaticText)(this.GetItem("lb_pgrp").Specific));
     this.EditText4             = ((SAPbouiCOM.EditText)(this.GetItem("txt_pgroup").Specific));
     this.EditText5             = ((SAPbouiCOM.EditText)(this.GetItem("t_absentry").Specific));
     this.OnCustomInitialize();
 }
        public static SAPbouiCOM.StaticText AddStaticTextAoFormulario(
            SAPbouiCOM.Form pForm
            , string pUID
            , int pLeft
            , int pWidth
            , int pTop
            , int pHeight
            , string pCaption
            , string pLinkTo = ""
            )
        {
            Item oItem = pForm.Items.Add(pUID, BoFormItemTypes.it_STATIC);

            SAPbouiCOM.StaticText oStaticText = null;
            oItem.Left            = pLeft;
            oItem.Width           = pWidth;
            oItem.Top             = pTop;
            oItem.Height          = pHeight;
            oItem.AffectsFormMode = false;
            oStaticText           = ((SAPbouiCOM.StaticText)(oItem.Specific));
            return(oStaticText);
        }
        private void CriarFormulario()
        {
            SAPbouiCOM.Item oItem = null;
            //SAPbouiCOM.Button oButton = null;
            SAPbouiCOM.StaticText oStaticText = null;
            SAPbouiCOM.ComboBox   oComboBox   = null;
            SAPbouiCOM.EditText   oEditText   = null;

            try
            {
                this.oForm = this.oApplication.Forms.Add("frmStatusBar", BoFormTypes.ft_Fixed, -1);
            }
            catch (COMException ex)
            {
                //if (ex.ErrorCode == -7010)
                //{
                //    this.oForm = this.oApplication.Forms.Add("frmStatusBar");


                //}
                //else
                //{
                System.Windows.Forms.MessageBox.Show(
                    ex.Message
                    , "Erro"
                    , System.Windows.Forms.MessageBoxButtons.OK
                    , System.Windows.Forms.MessageBoxIcon.Error
                    );
                System.Environment.Exit(0);

                //}
            }

            ConfiguraForm(
                "Exemplo Status Bar"
                , 400
                , 350
                , 100
                , 80
                );
            //add botao ok
            this.oButtonOK            = UIHelper.AddBotaoAoFormulario(this.oForm, "1", 6, 65, 53, 19, "OK");
            this.oButtonMenssagem     = UIHelper.AddBotaoAoFormulario(this.oForm, "BTN_STATUS", 90, 150, 53, 19, "Mostrar Mensagem");
            this.oItemRect            = UIHelper.AddRectAoFormulario(this.oForm, "Rect1", 0, 344, 1, 45);
            this.oComboBoxTypeMessage = UIHelper.AddComboBoxAoFormulario(this.oForm, "ComboBox1", 157, 163, 24, 14);
            this.oEditTextMessage     = UIHelper.AddEditTextAoFormulario(this.oForm, "edtMessage", 157, 163, 8, 14);



            this.oStaticTextMensagem     = UIHelper.AddStaticTextAoFormulario(this.oForm, "st01", 7, 148, 8, 14, "Mensagem de texto:", "edtMessage");
            this.oStaticTextTipoMensagem = UIHelper.AddStaticTextAoFormulario(this.oForm, "st02", 7, 148, 8, 14, "Mensagem de texto:", "ComboBox1");

            this.AddDataSources();


            this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Warning), "Warning");
            this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Error), "Error");
            this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_None), "None");
            this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Success), "Sucess");

            this.oComboBoxTypeMessage.Select(0, BoSearchKey.psk_Index);
        }
Exemplo n.º 11
0
        protected virtual void e_FormLoad(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent)
        {
            try
            {
                if (pVal.BeforeAction == false && bLoadInputEvents)
                {
                    oform              = oApplication.Forms.Item(pVal.FormUID);
                    oform.ClientWidth  = 450;
                    oform.ClientHeight = 400;
                    dtSearch           = oform.DataSources.DataTables.Add("dtSearch");
                    // oform.Width = 600;
                    oform.Title = sTitle;


                    oform.State = BoFormStateEnum.fs_Maximized;
                    SAPbouiCOM.Item oItem;
                    IbtChoos     = oform.Items.Item("1");
                    IbtChoos.Top = 350;

                    btChoos          = (SAPbouiCOM.Button)IbtChoos.Specific;
                    btChoos.Caption  = "Choose";
                    ISearchField     = oform.Items.Item("2");
                    ISearchField.Top = 350;

                    SAPbouiCOM.Columns     oColumns;
                    SAPbouiCOM.DataColumns dtCols;
                    dtCols = dtSearch.Columns;
                    SAPbouiCOM.Column     oColumn;
                    SAPbouiCOM.DataColumn dtCol;
                    oItem         = oform.Items.Add("mtSearch", BoFormItemTypes.it_MATRIX);
                    oItem.Width   = 440;
                    oItem.Height  = 290;
                    oItem.Top     = 60;
                    oItem.Enabled = true;


                    mtSearch = (SAPbouiCOM.Matrix)oItem.Specific;

                    // mtSearch.
                    oItem      = oform.Items.Add("lbCritaria", BoFormItemTypes.it_STATIC);
                    oItem.Top  = 40;
                    oItem.Left = 10;

                    SAPbouiCOM.StaticText lblCri = (SAPbouiCOM.StaticText)oItem.Specific;

                    lblCri.Caption = "Find";

                    oItem       = oform.Items.Add("txCritaria", BoFormItemTypes.it_EDIT);
                    oItem.Top   = 40;
                    oItem.Width = 300;
                    oItem.Left  = 130;

                    //SAPbouiCOM.StaticText lblCri = oItem.Specific;



                    if (flgMultiple)
                    {
                    }
                    else
                    {
                        mtSearch.SelectionMode = BoMatrixSelect.ms_Single;
                    }
                    // mtSearch

                    oColumns = mtSearch.Columns;
                    //mtSearch.Layout = BoMatrixLayoutType.mlt_Vertical;
                    oColumn = oColumns.Add("vFix", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                    // oColumn.Editable = false;
                    oColumn.Width = 40;
                    //oColumn.Visible = false;
                    int i = 0;
                    int j = 0;
                    foreach (System.Data.DataColumn cl in dtTable.Columns)
                    {
                        dtOut.Columns.Add(cl.ColumnName);
                        oColumn = oColumns.Add("v_" + i.ToString(), SAPbouiCOM.BoFormItemTypes.it_EDIT);
                        oColumn.TitleObject.Caption = cl.Caption;
                        oColumn.Width = 100;

                        oColumn.Editable = false;
                        dtCol            = dtCols.Add("cd" + i.ToString(), BoFieldsType.ft_AlphaNumeric);
                        oColumn.DataBind.Bind("dtSearch", "cd" + i.ToString());
                        // oColumn.
                        i++;
                        // col.DataBind.TableName = "dtSearch";
                        //col.DataBind
                    }
                    dtSearch.Rows.Clear();
                    i = 0;
                    j = 0;
                    foreach (DataRow dr in dtTable.Rows)
                    {
                        dtSearch.Rows.Add(1);
                        j = 0;
                        foreach (System.Data.DataColumn col in dtTable.Columns)
                        {
                            dtSearch.SetValue("cd" + j.ToString(), i, dr[j].ToString());
                            j++;
                        }
                        i++;
                    }
                    mtSearch.LoadFromDataSource();

                    oform = null;
                }
            }
            catch (Exception ex)
            {
                bLoadInputEvents = false;
            }
        }
Exemplo n.º 12
0
        private void createUI()
        {
            int oldpanLevel = oForm.PaneLevel;

            if (oldpanLevel == 2)
            {
                oForm.PaneLevel = 1;
            }
            oForm.Freeze(true);



            SAPbouiCOM.Item   oItem;
            SAPbouiCOM.Item   oItem1;
            SAPbouiCOM.Folder oFolder;
            SAPbouiCOM.Item   oItemRef = oForm.Items.Item("126");


            try
            {
                cflcardcode(ocflCard, "ocflCard");


                // add Routing Matrix

                oItem           = oForm.Items.Add("lblCost", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top       = oItemRef.Top + 30;
                oItem.Height    = oItemRef.Height;
                oItem.Left      = oItemRef.Left;
                oItem.Width     = oItemRef.Width;
                oItem.FromPane  = 2;
                oItem.ToPane    = 2;
                oItem.TextStyle = 4;

                Program.objHrmsUI.loadSettings();
                oItem.LinkTo    = oItemRef.UniqueID;
                lblCost         = (SAPbouiCOM.StaticText)oItem.Specific;
                lblCost.Caption = "Cost Posting";


                oItem           = oForm.Items.Add("lblCard", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top       = oItemRef.Top + 50;
                oItem.Height    = oItemRef.Height;
                oItem.Left      = oItemRef.Left;
                oItem.Width     = oItemRef.Width;
                oItem.FromPane  = 2;
                oItem.ToPane    = 2;
                oItem.Visible   = false;
                oItem.LinkTo    = oItemRef.UniqueID;
                lblCard         = (SAPbouiCOM.StaticText)oItem.Specific;
                lblCard.Caption = "Supplier";


                oItem          = oForm.Items.Add("txSupplier", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + 50;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.LinkTo   = "lblCard";
                txSupplier     = (SAPbouiCOM.EditText)oItem.Specific;

                oForm.DataSources.UserDataSources.Add("txSupplier", SAPbouiCOM.BoDataType.dt_SHORT_TEXT);
                txSupplier.DataBind.SetBound(true, "", "txSupplier");


                txSupplier.ChooseFromListUID   = ocflCard.UniqueID;
                txSupplier.ChooseFromListAlias = "CardCode";
                oItem.Visible = false;

                txSupplier.ChooseFromListUID   = ocflCard.UniqueID;
                txSupplier.ChooseFromListAlias = "CardCode";



                oItem          = oForm.Items.Add("lnkCard", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
                oItem.Top      = oItemRef.Top + 50;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width - 20;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.LinkTo   = "txSupplier";
                SAPbouiCOM.LinkedButton lnkCard = (SAPbouiCOM.LinkedButton)oItem.Specific;
                lnkCard.LinkedObject     = BoLinkedObject.lf_BusinessPartner;
                lnkCard.LinkedObjectType = "2";



                oItemRef = lblCard.Item;

                oItem          = oForm.Items.Add("lblRef", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                lblRef         = (SAPbouiCOM.StaticText)oItem.Specific;
                lblRef.Caption = "Ref #";


                oItem          = oForm.Items.Add("txRef", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                txRef          = (SAPbouiCOM.EditText)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("txRef", SAPbouiCOM.BoDataType.dt_SHORT_TEXT);
                txRef.DataBind.SetBound(true, "", "txRef");


                oItemRef = lblRef.Item;

                oItem          = oForm.Items.Add("lblPD", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                lblPD          = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPD.Caption  = "Posting Date";


                oItem          = oForm.Items.Add("txPD", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                txPostingDate  = (SAPbouiCOM.EditText)oItem.Specific;

                oForm.DataSources.UserDataSources.Add("txPD", SAPbouiCOM.BoDataType.dt_DATE);
                txPostingDate.DataBind.SetBound(true, "", "txPD");

                oItemRef = lblPD.Item;

                oItem          = oForm.Items.Add("lblEA", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                lblEA          = (SAPbouiCOM.StaticText)oItem.Specific;
                lblEA.Caption  = "Expense Account";


                oItem          = oForm.Items.Add("txEA", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                txEA           = (SAPbouiCOM.EditText)oItem.Specific;

                oForm.DataSources.UserDataSources.Add("txEA", SAPbouiCOM.BoDataType.dt_SHORT_TEXT);
                txEA.DataBind.SetBound(true, "", "txEA");
                txEA.Value = Program.objHrmsUI.getSetting("DfltExp");


                oItemRef = lblEA.Item;

                oItem              = oForm.Items.Add("lblPE", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top          = oItemRef.Top + 18;
                oItem.Height       = oItemRef.Height;
                oItem.Left         = oItemRef.Left;
                oItem.Width        = oItemRef.Width;
                oItem.FromPane     = 2;
                oItem.ToPane       = 2;
                oItem.Visible      = false;
                oItem.LinkTo       = oItemRef.UniqueID;
                lblPE              = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPE.Caption      = "Posted AP";
                lblPE.Item.Visible = false;

                oItem          = oForm.Items.Add("txPE", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Enabled  = false;
                oItem.Width    = 150;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.Visible  = false;
                oItem.LinkTo   = oItemRef.UniqueID;
                txPE           = (SAPbouiCOM.EditText)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("txPE", SAPbouiCOM.BoDataType.dt_SHORT_TEXT);
                txPE.DataBind.SetBound(true, "", "txPE");



                oItem          = oForm.Items.Add("lnkPE", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
                oItem.Top      = oItemRef.Top + 18;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width - 20;
                oItem.FromPane = 2;
                oItem.ToPane   = 2;
                oItem.LinkTo   = "txPE";
                SAPbouiCOM.LinkedButton lnkPE = (SAPbouiCOM.LinkedButton)oItem.Specific;
                lnkPE.LinkedObject     = BoLinkedObject.lf_PurchaseInvoice;
                lnkPE.LinkedObjectType = "18";



                oItemRef = txPE.Item;


                oItem               = oForm.Items.Add("btPost", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                oItem.Top           = oItemRef.Top + 18;
                oItem.Height        = oItemRef.Height + 5;
                oItem.Left          = oItemRef.Left;
                oItem.Enabled       = true;
                oItem.Width         = 150;
                oItem.FromPane      = 2;
                oItem.ToPane        = 2;
                oItem.LinkTo        = oItemRef.UniqueID;
                btPost              = (SAPbouiCOM.Button)oItem.Specific;
                btPost.Caption      = "Post AP";
                btPost.Item.Visible = false;

                txPE.Item.Enabled = false;
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }

            oForm.Freeze(false);
            txPE.Item.Enabled = false;
            oForm.PaneLevel   = oldpanLevel;
        }
Exemplo n.º 13
0
        public void SetTextApply(SAPbouiCOM.Form oForm)
        {
            oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

            try
            {
                oForm.Freeze(true);

                string cboYEAR = oForm.DataSources.UserDataSources.Item("cboYEAR").Value;
                string cboDTCD = oForm.DataSources.UserDataSources.Item("cboDTCD").Value;

                StringBuilder pQuery = new StringBuilder();
                string query = string.Empty;

                pQuery.AppendLine(" EXEC KIS_SP_HR0140F_HRD               ");
                pQuery.AppendLine("         @cboYEAR		 = '{0}'      ");
                pQuery.AppendLine("        ,@cboDTCD		 = '{1}'      ");

                string sQry = string.Format(pQuery.ToString(), cboYEAR, cboDTCD);
                oRS.DoQuery(sQry);

                //직무만족도
                #region sttHR05

                //업무의양
                #region sttHR0501
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0501").Specific; oStatic.Caption = oRS.Fields.Item("HR0501").Value.ToString();
                //oForm.Items.Item("sttHR0501").TextStyle = (int)BoTextStyle.ts_UNDERLINE;
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0511").Specific; oStatic.Caption = oRS.Fields.Item("HR0511").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0521").Specific; oStatic.Caption = oRS.Fields.Item("HR0521").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0531").Specific; oStatic.Caption = oRS.Fields.Item("HR0531").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0541").Specific; oStatic.Caption = oRS.Fields.Item("HR0541").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0551").Specific; oStatic.Caption = oRS.Fields.Item("HR0551").Value.ToString();
                #endregion

                //업무의양 비율
                #region sttHR05011
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05111").Specific; oStatic.Caption = oRS.Fields.Item("HR05111").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05211").Specific; oStatic.Caption = oRS.Fields.Item("HR05211").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05311").Specific; oStatic.Caption = oRS.Fields.Item("HR05311").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05411").Specific; oStatic.Caption = oRS.Fields.Item("HR05411").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05511").Specific; oStatic.Caption = oRS.Fields.Item("HR05511").Value.ToString();
                #endregion

                //업무난이도
                #region sttHR0502
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0502").Specific; oStatic.Caption = oRS.Fields.Item("HR0502").Value.ToString();
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0512").Specific; oStatic.Caption = oRS.Fields.Item("HR0512").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0522").Specific; oStatic.Caption = oRS.Fields.Item("HR0522").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0532").Specific; oStatic.Caption = oRS.Fields.Item("HR0532").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0542").Specific; oStatic.Caption = oRS.Fields.Item("HR0542").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0552").Specific; oStatic.Caption = oRS.Fields.Item("HR0552").Value.ToString();
                #endregion

                //업무난이도 비율
                #region sttHR05021
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05121").Specific; oStatic.Caption = oRS.Fields.Item("HR05121").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05221").Specific; oStatic.Caption = oRS.Fields.Item("HR05221").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05321").Specific; oStatic.Caption = oRS.Fields.Item("HR05321").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05421").Specific; oStatic.Caption = oRS.Fields.Item("HR05421").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05521").Specific; oStatic.Caption = oRS.Fields.Item("HR05521").Value.ToString();
                #endregion

                //적성적합도
                #region sttHR0503
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0503").Specific; oStatic.Caption = oRS.Fields.Item("HR0503").Value.ToString();
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0513").Specific; oStatic.Caption = oRS.Fields.Item("HR0513").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0523").Specific; oStatic.Caption = oRS.Fields.Item("HR0523").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0533").Specific; oStatic.Caption = oRS.Fields.Item("HR0533").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0543").Specific; oStatic.Caption = oRS.Fields.Item("HR0543").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0553").Specific; oStatic.Caption = oRS.Fields.Item("HR0553").Value.ToString();
                #endregion

                //적성적합도 비율
                #region sttHR05031
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05131").Specific; oStatic.Caption = oRS.Fields.Item("HR05131").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05231").Specific; oStatic.Caption = oRS.Fields.Item("HR05231").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05331").Specific; oStatic.Caption = oRS.Fields.Item("HR05331").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05431").Specific; oStatic.Caption = oRS.Fields.Item("HR05431").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR05531").Specific; oStatic.Caption = oRS.Fields.Item("HR05531").Value.ToString();
                #endregion

                #endregion

                
                //조직만족도
                #region sttHR06

                //상하간의 의사소통
                #region sttHR0601
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0601").Specific; oStatic.Caption = oRS.Fields.Item("HR0601").Value.ToString();
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0611").Specific; oStatic.Caption = oRS.Fields.Item("HR0611").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0621").Specific; oStatic.Caption = oRS.Fields.Item("HR0621").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0631").Specific; oStatic.Caption = oRS.Fields.Item("HR0631").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0641").Specific; oStatic.Caption = oRS.Fields.Item("HR0641").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0651").Specific; oStatic.Caption = oRS.Fields.Item("HR0651").Value.ToString();
                #endregion

                //상하간의 의사소통 비율
                #region sttHR06011
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06111").Specific; oStatic.Caption = oRS.Fields.Item("HR06111").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06211").Specific; oStatic.Caption = oRS.Fields.Item("HR06211").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06311").Specific; oStatic.Caption = oRS.Fields.Item("HR06311").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06411").Specific; oStatic.Caption = oRS.Fields.Item("HR06411").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06511").Specific; oStatic.Caption = oRS.Fields.Item("HR06511").Value.ToString();
                #endregion

                //복리후생제도
                #region sttHR0602
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0602").Specific; oStatic.Caption = oRS.Fields.Item("HR0602").Value.ToString();
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0612").Specific; oStatic.Caption = oRS.Fields.Item("HR0612").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0622").Specific; oStatic.Caption = oRS.Fields.Item("HR0622").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0632").Specific; oStatic.Caption = oRS.Fields.Item("HR0632").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0642").Specific; oStatic.Caption = oRS.Fields.Item("HR0642").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0652").Specific; oStatic.Caption = oRS.Fields.Item("HR0652").Value.ToString();
                #endregion

                //복리후생제도 비율
                #region sttHR06021
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06121").Specific; oStatic.Caption = oRS.Fields.Item("HR06121").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06221").Specific; oStatic.Caption = oRS.Fields.Item("HR06221").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06321").Specific; oStatic.Caption = oRS.Fields.Item("HR06321").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06421").Specific; oStatic.Caption = oRS.Fields.Item("HR06421").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06521").Specific; oStatic.Caption = oRS.Fields.Item("HR06521").Value.ToString();
                #endregion

                //미래비전
                #region sttHR0603
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0603").Specific; oStatic.Caption = oRS.Fields.Item("HR0603").Value.ToString();
                //대단히많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0613").Specific; oStatic.Caption = oRS.Fields.Item("HR0613").Value.ToString();
                //많다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0623").Specific; oStatic.Caption = oRS.Fields.Item("HR0623").Value.ToString();
                //보통이다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0633").Specific; oStatic.Caption = oRS.Fields.Item("HR0633").Value.ToString();
                //적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0643").Specific; oStatic.Caption = oRS.Fields.Item("HR0643").Value.ToString();
                //대단히적다
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR0653").Specific; oStatic.Caption = oRS.Fields.Item("HR0653").Value.ToString();
                #endregion

                //미래비전 비율
                #region sttHR06031
                //대단히많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06131").Specific; oStatic.Caption = oRS.Fields.Item("HR06131").Value.ToString();
                //많다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06231").Specific; oStatic.Caption = oRS.Fields.Item("HR06231").Value.ToString();
                //보통이다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06331").Specific; oStatic.Caption = oRS.Fields.Item("HR06331").Value.ToString();
                //적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06431").Specific; oStatic.Caption = oRS.Fields.Item("HR06431").Value.ToString();
                //대단히적다 비율
                oStatic = (SAPbouiCOM.StaticText)oForm.Items.Item("sttHR06531").Specific; oStatic.Caption = oRS.Fields.Item("HR06531").Value.ToString();
                #endregion

                #endregion


            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }

            finally
            {
                oForm.Freeze(false);
                oRS = null;
                oStatic = null;

            }

        }
Exemplo n.º 14
0
        /// <summary>
        /// Crea los campos definido por el usuario
        /// </summary>
        /// <param name="_oForma">Forma activa</param>
        private void CrearCamposDeUsuario(Form _oForma)
        {
            SAPbouiCOM.Item newItem = null;
            try
            {
                try
                {
                    string s = _oForma.Items.Item(TXT_NOMBRE_PROMOTOR).UniqueID;
                }
                catch (Exception)
                {
                    _oForma.Freeze(true);

                    //Label 'Nombre promotor' ligado al campo de Label 'promotor'.
                    SAPbouiCOM.Item _olblPro = null;
                    _olblPro                    = _oForma.Items.Item(LBL_PROMOTOR);
                    newItem                     = _oForma.Items.Add(LBL_NOMBRE_PROMOTOR, BoFormItemTypes.it_STATIC);
                    newItem.Left                = _olblPro.Left;
                    newItem.Top                 = _olblPro.Top + 18;
                    newItem.Width               = 70;
                    newItem.ToPane              = 0;
                    _oLblNombrePromotor         = newItem.Specific;
                    _oLblNombrePromotor.Caption = "Nombre";

                    //Label 'Label serie' ligado al campo de Label 'Nombre promotor'.
                    SAPbouiCOM.Item _oLblNombreProm = null;
                    _oLblNombreProm    = _oForma.Items.Item(LBL_NOMBRE_PROMOTOR);
                    newItem            = _oForma.Items.Add(LBL_SERIE, BoFormItemTypes.it_STATIC);
                    newItem.Left       = _oLblNombreProm.Left;
                    newItem.Top        = _oLblNombreProm.Top + 20;
                    newItem.Width      = 70;
                    newItem.ToPane     = 0;
                    _oLblSerie         = newItem.Specific;
                    _oLblSerie.Caption = "Serie";

                    //Campo texto 'Nombre promotor' ligado al campo de Label 'Nombre promotor'.
                    SAPbouiCOM.Item _oLblNP = null;
                    _oLblNP             = _oForma.Items.Item(LBL_NOMBRE_PROMOTOR);
                    newItem             = _oForma.Items.Add(TXT_NOMBRE_PROMOTOR, BoFormItemTypes.it_EDIT);
                    newItem.Left        = _oLblNP.Left + 80;
                    newItem.Top         = _oLblNP.Top;
                    newItem.Width       = 141;
                    newItem.Height      = 15;
                    newItem.ToPane      = 0;
                    _oTxtNombrePromotor = (SAPbouiCOM.EditText)newItem.Specific;
                    _oTxtNombrePromotor.DataBind.SetBound(true, "OWTR", "U_NombreP");
                    _oLblNP.LinkTo = newItem.UniqueID;

                    //Campo texto 'Serie' ligado al campo de Label 'Serie'.
                    SAPbouiCOM.Item _oLblSer = null;
                    _oLblSer        = _oForma.Items.Item(LBL_SERIE);
                    newItem         = _oForma.Items.Add(TXT_SERIE, BoFormItemTypes.it_EDIT);
                    newItem.Left    = _oLblSer.Left + 80;
                    newItem.Top     = _oLblSer.Top;
                    newItem.Width   = 141;
                    newItem.Height  = 15;
                    newItem.ToPane  = 0;
                    _oTxtSerie      = (SAPbouiCOM.EditText)newItem.Specific;
                    _oLblSer.LinkTo = newItem.UniqueID;

                    _oContadorFormas += 1;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error al crear campos de usuario *CrearCamposDeUsuario* : " + ex.Message);
            }
            finally
            {
                _oForma.Freeze(false);
            }
        }
Exemplo n.º 15
0
        public new bool InitForm(string uid, string xmlPath, ref Application application, ref SAPbobsCOM.Company company, ref CSBOFunctions SBOFunctions, ref TGlobalVid _GlobalSettings)
        {
            Int32 CantRol;

            SAPbouiCOM.Folder oFolder;
            SAPbouiCOM.Item   oItem;
            SAPbouiCOM.Item   oItemB;
            Boolean           Flag;


            bool Result = base.InitForm(uid, xmlPath, ref application, ref company, ref SBOFunctions, ref _GlobalSettings);

            oRecordSet      = (SAPbobsCOM.Recordset)(FCmpny.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));
            Funciones.SBO_f = FSBOf;
            try
            {
                Lista = new List <string>();
                oForm = FSBOApp.Forms.Item(uid);
                Flag  = false;
                oForm.Freeze(true);

                if (GlobalSettings.RunningUnderSQLServer)
                {
                    s = "select ISNULL(TaxIdNum,'') TaxIdNum from OADM ";
                }
                else
                {
                    s = @"select IFNULL(""TaxIdNum"",'') ""TaxIdNum"" from ""OADM"" ";
                }

                oRecordSet.DoQuery(s);
                if (oRecordSet.RecordCount == 0)
                {
                    throw new Exception("Debe ingresar RUC de Emisor, Gestión -> Inicialización Sistema -> Detalle Sociedad -> Datos de Contabilidad -> ID fiscal general 1");
                }
                else
                {
                    RUC = ((System.String)oRecordSet.Fields.Item("TaxIdNum").Value).Trim();
                }


                //Campo con el estado de DTE
                oItemB          = oForm.Items.Item("53");
                oItem           = oForm.Items.Add("lblEstado", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Left      = oItemB.Left;
                oItem.Width     = oItemB.Width;
                oItem.Top       = oItemB.Top + oItemB.Height + 5;
                oItem.Height    = oItem.Height;
                oItem.LinkTo    = "VID_FEEstado";
                oStatic         = (StaticText)(oForm.Items.Item("lblEstado").Specific);
                oStatic.Caption = "Estado Doc. Electronico";

                oItemB            = oForm.Items.Item("52");
                oItem             = oForm.Items.Add("VID_Estado", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Left        = oItemB.Left;
                oItem.Width       = oItemB.Width;
                oItem.Top         = oItemB.Top + oItemB.Height + 5;
                oItem.Height      = oItem.Height;
                oItem.DisplayDesc = true;
                oItem.Enabled     = false;
                oComboBox         = (ComboBox)(oForm.Items.Item("VID_Estado").Specific);

                //colocar folder con los campos necesarios en FE PERU
                //oForm.DataSources.UserDataSources.Add("VID_FEDCTO", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);
                //oItem = oForm.Items.Add("VID_FEDCTO", SAPbouiCOM.BoFormItemTypes.it_FOLDER);

                //oItemB = oForm.Items.Item("1320002137");

                //oItem.Left = oItemB.Left + 30;
                //oItem.Width = oItemB.Width;
                //oItem.Top = oItemB.Top;
                //oItem.Height = oItem.Height;
                //oFolder = (Folder)((oItem.Specific));
                //oFolder.Caption = "Factura Electrónica";
                //oFolder.Pane = 333;
                //oFolder.DataBind.SetBound(true, "", "VID_FEDCTO");
                //para SAP 882 en adelante
                //oFolder.GroupWith("1320002137");

                //cargar campos de usuarios
                oItemB       = oForm.Items.Item("lblEstado");
                oItem        = oForm.Items.Add("lblPTSC", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Left   = oItemB.Left;
                oItem.Width  = oItemB.Width;
                oItem.Top    = oItemB.Top + oItemB.Height + 5;
                oItem.Height = oItemB.Height;
                //oItem.FromPane = 333;
                //oItem.ToPane = 333;
                oItem.LinkTo    = "VID_FEPTSC";
                oStatic         = (StaticText)(oForm.Items.Item("lblPTSC").Specific);
                oStatic.Caption = "Serie del documento";

                oItemB       = oForm.Items.Item("VID_Estado");
                oItem        = oForm.Items.Add("VID_FEPTSC", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Left   = oItemB.Left;
                oItem.Width  = 90; // oItemB.Width;
                oItem.Top    = oItemB.Top + oItemB.Height + 5;
                oItem.Height = oItemB.Height;
                //oItem.FromPane = 333;
                //oItem.ToPane = 333;
                oItem.RightJustified = true;
                oEditText            = (EditText)(oForm.Items.Item("VID_FEPTSC").Specific);
                oEditText.DataBind.SetBound(true, "OVPM", "U_BPP_PTSC");

                //--
                oItemB       = oForm.Items.Item("lblPTSC");
                oItem        = oForm.Items.Add("lblPTCC", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Left   = oItemB.Left;
                oItem.Width  = oItemB.Width;
                oItem.Top    = oItemB.Top + oItemB.Height + 5;
                oItem.Height = oItemB.Height;
                //oItem.FromPane = 333;
                //oItem.ToPane = 333;
                oItem.LinkTo    = "VID_FEPTCC";
                oStatic         = (StaticText)(oForm.Items.Item("lblPTCC").Specific);
                oStatic.Caption = "Correlativo del documento";

                oItemB       = oForm.Items.Item("VID_FEPTSC");
                oItem        = oForm.Items.Add("VID_FEPTCC", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Left   = oItemB.Left;
                oItem.Width  = 90; // oItemB.Width;
                oItem.Top    = oItemB.Top + oItemB.Height + 5;
                oItem.Height = oItemB.Height;
                //oItem.FromPane = 333;
                //oItem.ToPane = 333;
                oItem.RightJustified = true;
                oEditText            = (EditText)(oForm.Items.Item("VID_FEPTCC").Specific);
                oEditText.DataBind.SetBound(true, "OVPM", "U_BPP_PTCC");
            }
            catch (Exception e)
            {
                OutLog("InitForm: " + e.Message + " ** Trace: " + e.StackTrace);
                FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", "");
            }
            finally
            {
                if (oForm != null)
                {
                    oForm.Visible = true;
                    oForm.Freeze(false);
                }
            }


            return(Result);
        }//fin InitForm
Exemplo n.º 16
0
        private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            try
            {
                if (pVal.FormTypeEx == "0" && pVal.FormTypeCount == 2 &&
                    pVal.EventType == BoEventTypes.et_FORM_LOAD && pVal.BeforeAction == false && pVal.ActionSuccess == true)
                {
                    SAPbouiCOM.Form formaEmergente = null;
                    formaEmergente = SBO_Application.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount);
                    if (formaEmergente.Title == "Mensaje sistema")
                    {
                        SAPbouiCOM.StaticText itemMensaje = null;

                        itemMensaje = formaEmergente.Items.Item(7).Specific;
                        var msgDescripcion = itemMensaje.Caption;

                        if (msgDescripcion.Contains(" ya se ha definido en el sistema en un campo único."))
                        {
                            SAPbouiCOM.Button btnCancel = null;
                            btnCancel = formaEmergente.Items.Item(1).Specific;
                            btnCancel.Item.Click();
                        }
                    }
                }

                if (pVal.BeforeAction == true)
                {
                    if (pVal.FormTypeEx == FRM_DATOS_MAESTROS_SOCIO.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("2561");
                    }

                    if (pVal.FormTypeEx == FRM_SOLICITUD_DE_PLANES.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("39698");
                    }

                    if (pVal.FormTypeEx == FRM_ORDEN_DE_COMPRA.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("2305");
                    }

                    if (pVal.FormTypeEx == FRM_ENTRADA_DE_MERCANCIA.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("2306");
                    }

                    if (pVal.FormTypeEx == FRM_FACTURA_DE_PROVEEDOR.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("2308");
                    }

                    if (pVal.FormTypeEx == FRM_SOLICITUD_DE_TRASLADO.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("3088");
                    }

                    if (pVal.FormTypeEx == FRM_TRANSFERENCIA_DE_STOCK.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("3080");
                    }

                    if (pVal.FormTypeEx == FRM_FACTURA_CLIENTES.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("2053");
                    }

                    if (pVal.FormTypeEx == FRM_DATOS_MAESTROS_EMPLEADO.ToString() && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {
                        Instance.Ejecutaclase("3590");
                    }

                    if (pVal.FormTypeEx == FRM_TRASPASOS)
                    {
                        if (pVal.EventType == BoEventTypes.et_KEY_DOWN && pVal.ItemUID == CAMPO_SERIE && pVal.CharPressed == CHAR_PRESS_ENTER)
                        {
                            BubbleEvent = false;
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 17
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    = "CFL3";
            oCP.FormType    = "CFL3";
            oCP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable;


            //  Adding the form
            oForm       = SBO_Application.Forms.AddEx(oCP);
            oForm.Title = "Configuración";

            oItem           = oForm.Items.Add("StaticTxt", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 20;
            oItem.LinkTo    = "EditTxt";
            oItem.Width     = 200;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "Carpeta de archivos";


            oItem           = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 50;
            oItem.LinkTo    = "EditTxt";
            oItem.Width     = 200;
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "Kilometros recorridos";

            oItem        = oForm.Items.Add("txtKM", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oItem.Left   = 120;
            oItem.Top    = 50;
            oItem.LinkTo = "StaticTxt2";
            oEdit        = ((SAPbouiCOM.EditText)(oItem.Specific));


            oItem           = oForm.Items.Add("StaticTxt3", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem.Left      = 10;
            oItem.Top       = 80;
            oItem.LinkTo    = "EditTxt";
            oStatic         = ((SAPbouiCOM.StaticText)(oItem.Specific));
            oStatic.Caption = "Horas de motor";

            oItem        = oForm.Items.Add("txtHoras", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oItem.Left   = 120;
            oItem.Top    = 80;
            oItem.LinkTo = "StaticTxt3";
            oEdit        = ((SAPbouiCOM.EditText)(oItem.Specific));

            //  Adding a CFL button
            oItem           = oForm.Items.Add("btnGuardar", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oItem.Left      = 120;
            oItem.Top       = 110;
            oButton         = ((SAPbouiCOM.Button)(oItem.Specific));
            oButton.Type    = SAPbouiCOM.BoButtonTypes.bt_Caption;
            oButton.Caption = "Guardar";
            oItem.Width     = 100;
            oItem.Height    = 20;


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

            oForm.Visible = true;
        }
Exemplo n.º 18
0
        private void InitiallizeForm()
        {
            //dtItem = oForm.DataSources.DataTables.Add("dtItem");

            //dtItem.Columns.Add("ItemCode", BoFieldsType.ft_AlphaNumeric, 50);
            //dtItem.Columns.Add("ItemName", BoFieldsType.ft_AlphaNumeric, 100);
            //dtItem.Columns.Add("FrignName", BoFieldsType.ft_AlphaNumeric, 100);
            //dtItem.Columns.Add("ItemGroup", BoFieldsType.ft_AlphaNumeric, 50);
            //dtItem.Columns.Add("AI", BoFieldsType.ft_AlphaNumeric, 100);
            //dtItem.Columns.Add("Remarks", BoFieldsType.ft_AlphaNumeric, 100);


            oForm.Freeze(true);
            dbQUT1 = oForm.DataSources.DBDataSources.Item("QUT1");

            mtItems = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;

            oItemRef = oForm.Items.Item("20");


            try
            {
                oForm.DataSources.UserDataSources.Add("FolderDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

                oItem         = oForm.Items.Add("ItemImage", SAPbouiCOM.BoFormItemTypes.it_PICTURE);
                oItem.Top     = oItemRef.Top;
                oItem.Height  = oItemRef.Height + 100;
                oItem.Left    = oItemRef.Left + oItemRef.Width + 20;
                oItem.Width   = oItemRef.Width + 200;
                oItem.Visible = true;
                ItemImage     = (SAPbouiCOM.PictureBox)oItem.Specific;
                oItem.LinkTo  = oItemRef.UniqueID;

                oItemRef = oForm.Items.Item("138");

                oItem        = oForm.Items.Add("fldNI", SAPbouiCOM.BoFormItemTypes.it_FOLDER);
                oItem.Width  = oItemRef.Width;
                oItem.Left   = oItemRef.Left + 400;
                oItem.Top    = oItemRef.Top;
                oItem.Height = oItemRef.Height;


                SAPbouiCOM.Folder fldNI = (SAPbouiCOM.Folder)oItem.Specific;
                fldNI.Pane = 101;
                fldNI.AutoPaneSelection = true;
                fldNI.Caption           = "New Item";
                fldNI.DataBind.SetBound(true, "", "FolderDS");

                fldNI.GroupWith("1320002137");



                oItemRef = oForm.Items.Item("48");

                oItem          = oForm.Items.Add("lblItCode", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top - 60;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "txItCode";
                SAPbouiCOM.StaticText lblItCode = (SAPbouiCOM.StaticText)oItem.Specific;
                lblItCode.Caption = "Item Code";

                oItem          = oForm.Items.Add("txItCode", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top - 60;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblItCode";
                txItCode       = (SAPbouiCOM.EditText)oItem.Specific;
                //  txItCode.DataBind.SetBound(true, "dtItem", "ItemCode");


                oItemRef       = oForm.Items.Item("lblItCode");
                oItem          = oForm.Items.Add("lblName", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblItCode";
                SAPbouiCOM.StaticText lblName = (SAPbouiCOM.StaticText)oItem.Specific;
                lblName.Caption = "Description";

                oItem          = oForm.Items.Add("txName", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 250;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblName";
                txName         = (SAPbouiCOM.EditText)oItem.Specific;



                oItemRef       = oForm.Items.Item("lblName");
                oItem          = oForm.Items.Add("lblIG", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblName";
                SAPbouiCOM.StaticText lblIG = (SAPbouiCOM.StaticText)oItem.Specific;
                lblIG.Caption = "Item Group";

                oItem             = oForm.Items.Add("cbIG", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "lblIG";
                cbIG              = (SAPbouiCOM.ComboBox)oItem.Specific;
                oItem.DisplayDesc = true;

                oItemRef       = oForm.Items.Item("lblIG");
                oItem          = oForm.Items.Add("lblPM1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblIG";
                SAPbouiCOM.StaticText lblPM1 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM1.Caption = "Type ";

                oItem             = oForm.Items.Add("cbPM1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbIG";
                cbPM1             = (SAPbouiCOM.ComboBox)oItem.Specific;
                oItem.DisplayDesc = true;



                oItemRef       = oForm.Items.Item("lblPM1");
                oItem          = oForm.Items.Add("lblPM2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM1";
                SAPbouiCOM.StaticText lblPM2 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM2.Caption = "Style";

                oItem             = oForm.Items.Add("cbPM2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM1";
                cbPM2             = (SAPbouiCOM.ComboBox)oItem.Specific;
                oItem.DisplayDesc = true;

                oItemRef       = oForm.Items.Item("lblPM2");
                oItem          = oForm.Items.Add("lblPM3", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM2";
                SAPbouiCOM.StaticText lblPM3 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM3.Caption = "Frame";

                oItem          = oForm.Items.Add("cbPM3", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + oItemRef.Width;
                oItem.Width    = 150;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "cbPM2";

                cbPM3 = (SAPbouiCOM.CheckBox)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("cbPM3", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                cbPM3.DataBind.SetBound(true, "", "cbPM3");

                oItem.DisplayDesc = true;

                oItemRef       = oForm.Items.Item("lblPM3");
                oItem          = oForm.Items.Add("lblPM4", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM3";
                SAPbouiCOM.StaticText lblPM4 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM4.Caption = "Panel";

                oItem             = oForm.Items.Add("cbPM4", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM3";
                oItem.DisplayDesc = true;
                cbPM4             = (SAPbouiCOM.CheckBox)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("cbPM4", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                cbPM4.DataBind.SetBound(true, "", "cbPM4");


                oItemRef       = oForm.Items.Item("lblPM4");
                oItem          = oForm.Items.Add("lblPM5", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM4";
                SAPbouiCOM.StaticText lblPM5 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM5.Caption = "Glass";

                oItem             = oForm.Items.Add("cbPM5", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM4";
                oItem.DisplayDesc = true;
                cbPM5             = (SAPbouiCOM.CheckBox)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("cbPM5", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                cbPM5.DataBind.SetBound(true, "", "cbPM5");


                oItemRef       = oForm.Items.Item("lblPM5");
                oItem          = oForm.Items.Add("lblPM6", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM5";
                SAPbouiCOM.StaticText lblPM6 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM6.Caption = "FlyScreen";

                oItem             = oForm.Items.Add("cbPM6", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM5";
                oItem.DisplayDesc = true;
                cbPM6             = (SAPbouiCOM.CheckBox)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("cbPM6", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                cbPM6.DataBind.SetBound(true, "", "cbPM6");

                oItemRef       = oForm.Items.Item("lblPM6");
                oItem          = oForm.Items.Add("lblPM7", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM6";
                SAPbouiCOM.StaticText lblPM7 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM7.Caption = "Color";

                oItem             = oForm.Items.Add("cbPM7", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM6";
                oItem.DisplayDesc = true;
                cbPM7             = (SAPbouiCOM.ComboBox)oItem.Specific;

                oItemRef       = oForm.Items.Item("lblPM7");
                oItem          = oForm.Items.Add("lblPM8", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblPM7";
                SAPbouiCOM.StaticText lblPM8 = (SAPbouiCOM.StaticText)oItem.Specific;
                lblPM8.Caption = "PV Box";

                oItem             = oForm.Items.Add("cbPM8", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + oItemRef.Width;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM7";
                oItem.DisplayDesc = true;
                cbPM8             = (SAPbouiCOM.CheckBox)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("cbPM8", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                cbPM8.DataBind.SetBound(true, "", "cbPM8");


                oItemRef       = oForm.Items.Item("cbPM1");
                oItem          = oForm.Items.Add("lblLength", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left + 300;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = oItemRef.UniqueID;
                SAPbouiCOM.StaticText lblLength = (SAPbouiCOM.StaticText)oItem.Specific;
                lblLength.Caption = "Length";

                oItem             = oForm.Items.Add("txL", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top         = oItemRef.Top;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left + 400;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "cbPM8";
                oItem.DisplayDesc = true;
                txL = (SAPbouiCOM.EditText)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("txL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                txL.DataBind.SetBound(true, "", "txL");

                oItemRef       = oForm.Items.Item("lblLength");
                oItem          = oForm.Items.Add("lblWidth", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblLength";
                SAPbouiCOM.StaticText lblW = (SAPbouiCOM.StaticText)oItem.Specific;
                lblW.Caption = "Width";

                oItemRef = oForm.Items.Item("txL");

                oItem             = oForm.Items.Add("txW", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "txL";
                oItem.DisplayDesc = true;
                txW = (SAPbouiCOM.EditText)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("txW", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                txW.DataBind.SetBound(true, "", "txW");

                oItemRef       = oForm.Items.Item("lblWidth");
                oItem          = oForm.Items.Add("lblHeight", SAPbouiCOM.BoFormItemTypes.it_STATIC);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = oItemRef.Width;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "lblWidth";
                SAPbouiCOM.StaticText lblH = (SAPbouiCOM.StaticText)oItem.Specific;
                lblH.Caption = "Height";

                oItemRef = oForm.Items.Item("txW");

                oItem             = oForm.Items.Add("txH", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                oItem.Top         = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height      = oItemRef.Height;
                oItem.Left        = oItemRef.Left;
                oItem.Width       = 150;
                oItem.FromPane    = 101;
                oItem.ToPane      = 101;
                oItem.LinkTo      = "txW";
                oItem.DisplayDesc = true;
                txH = (SAPbouiCOM.EditText)oItem.Specific;
                oForm.DataSources.UserDataSources.Add("txH", SAPbouiCOM.BoDataType.dt_SHORT_TEXT); // Days of Month
                txH.DataBind.SetBound(true, "", "txH");

                oItemRef = oForm.Items.Item("txH");

                oItem          = oForm.Items.Add("btNI", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                oItem.Top      = oItemRef.Top + oItemRef.Height + 2;
                oItem.Height   = oItemRef.Height + 5;
                oItem.Left     = oItemRef.Left;
                oItem.Width    = 150;
                oItem.FromPane = 101;
                oItem.ToPane   = 101;
                oItem.LinkTo   = "cbPM5";
                btNI           = (SAPbouiCOM.Button)oItem.Specific;

                btNI.Caption = "Add New Item";
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }
            try
            {
                fillPrs();
            }
            catch { }
            oForm.Freeze(false);
            dsWEB = new DataServices(Program.strExtCon);
        }