Exemple #1
0
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            // Program.objHrmsUI.ExecQuery("Update B1_SCHMDT set u_upd='Y' where isnull(u_upd,'N') = 'N'", "Finalizing temp");
            Program.objHrmsUI.ExecQuery("delete from [@B1_SCHMDT]  where isnull(u_upd,'N') = 'N'", "Finalizing temp");
            Program.objHrmsUI.ExecQuery("delete from [@B1_SCHMDY]  where isnull(u_upd,'N') = 'N'", "Finalizing temp");
            Program.objHrmsUI.ExecQuery("delete from [@B1_SO]  where isnull(u_upd,'N') = 'N'", "Finalizing temp");
            Program.objHrmsUI.ExecQuery("delete from [@B1_SCHOT]  where isnull(u_upd,'N') = 'N'", "Finalizing temp");


            cardCFL = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflCRD");
            SAPbouiCOM.Conditions oCons = cardCFL.GetConditions();
            SAPbouiCOM.Condition  oCon  = oCons.Add();
            oCon.Alias     = "CardType";
            oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
            oCon.CondVal   = "C";
            cardCFL.SetConditions(oCons);

            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            dtItem = oForm.DataSources.DataTables.Item("dtItem");
            dtDate = oForm.DataSources.DataTables.Item("dtDate");
            dtDays = oForm.DataSources.DataTables.Item("dtDays");
            dtOSCN = oForm.DataSources.DataTables.Item("dtOSCN");
            dtOT   = oForm.DataSources.DataTables.Item("dtOT");

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

            mtDate = (SAPbouiCOM.Matrix)oForm.Items.Item("mtDate").Specific;
            mtDay  = (SAPbouiCOM.Matrix)oForm.Items.Item("mtDays").Specific;
            mtOSCN = (SAPbouiCOM.Matrix)oForm.Items.Item("mtOSCN").Specific;
            mtOT   = (SAPbouiCOM.Matrix)oForm.Items.Item("mtOT").Specific;


            dtHead.Rows.Add(1);
            dtHead.SetValue("tsActive", 0, "Y");


            txCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCode").Specific;
            txName = (SAPbouiCOM.EditText)oForm.Items.Item("txName").Specific;
            txCT   = (SAPbouiCOM.EditText)oForm.Items.Item("txCT").Specific;
            txOTDT = (SAPbouiCOM.EditText)oForm.Items.Item("txOTDT").Specific;

            txICode  = (SAPbouiCOM.EditText)oForm.Items.Item("txICode").Specific;
            txOMDT   = (SAPbouiCOM.EditText)oForm.Items.Item("txOMDT").Specific;
            txOICODE = (SAPbouiCOM.EditText)oForm.Items.Item("txOICODE").Specific;
            imgImage = (SAPbouiCOM.PictureBox)oForm.Items.Item("imgImage").Specific;
            txSL     = (SAPbouiCOM.EditText)oForm.Items.Item("txSL").Specific;



            cbSP    = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbSP").Specific;
            cbDays  = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbDays").Specific;
            cbWeeks = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbWeeks").Specific;

            cbHH  = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbHH").Specific;
            cbMM  = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbMM").Specific;
            cbAP  = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbAP").Specific;
            cbEWN = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbEWN").Specific;

            cbOTHH = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOTHH").Specific;
            cbOTMM = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOTMM").Specific;
            cbOTAP = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOTAP").Specific;



            opOD = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opOD").Specific;
            opOW = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opOW").Specific;
            opOM = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opOM").Specific;
            OMDY = (SAPbouiCOM.OptionBtn)oForm.Items.Item("OMDY").Specific;
            OMDT = (SAPbouiCOM.OptionBtn)oForm.Items.Item("OMDT").Specific;

            opOW.GroupWith("opOD");
            opOM.GroupWith("opOD");

            OMDY.GroupWith("OMDT");
            opOD.Selected = true;
            OMDT.Selected = true;
            tbSO          = (SAPbouiCOM.Folder)oForm.Items.Item("tbSO").Specific;
            tbTS          = (SAPbouiCOM.Folder)oForm.Items.Item("tbTS").Specific;

            tbTS.Select();
            fillCBs();
            oForm.Freeze(false);

            txCode.Active = true;
        }
Exemple #2
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);
        }