コード例 #1
0
        public ChooseFromList()
        {
            AppHelper.SetApplication(ref this.oApplication);

            this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Fixed, "CFL1", "CFL1", 150, 350, true, 0, "Exemplo de Choose From List");

            UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
            UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDSN", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);

            AddChooseFromList();
            this.oEditTxt   = UIHelper.AddEditTextAoFormulario(this.oForm, "EditTxt", 120, 0, 90, 0, "StaticTxt", false, 0, 0);
            this.oEditTxtN  = UIHelper.AddEditTextAoFormulario(this.oForm, "EditTxtN", 120, 0, 105, 0, "EditTxt", false, 0, 0);
            this.oStaticTxt = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticTxt", 10, 0, 90, 0, "Cliente");


            this.oStaticExplain  = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain", 10, 200, 10, 0, "São dois choosen From List Aqui no Formulário");
            this.oStaticExplain1 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain1", 10, 300, 25, 0, "Um deles é ativado pressionando TAB no Edit Text...");
            this.oStaticExplain2 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain2", 10, 300, 40, 0, "Somente é mostrado quando o Parceiro de Negócios é Cleinte...");
            this.oStaticExplain3 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain3", 10, 300, 55, 0, "O Outro Choose From List é ativado pelo Botão...");
            this.oStaticExplain4 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain4", 10, 300, 70, 0, "Mostra todos os parceiros de negocios ....");

            string sImagem = System.Windows.Forms.Application.StartupPath + @"\CFL.BMP";;

            this.oButton = UIHelper.AddBotaoImagemAoFormulario(this.oForm, "Button", 199, 20, 88, 20, sImagem);

            this.oEditTxt.DataBind.SetBound(true, "", "EditDS");
            this.oEditTxtN.DataBind.SetBound(true, "", "EditDSN");

            this.oEditTxt.ChooseFromListUID = "CFL1";
            this.oButton.ChooseFromListUID  = "CFL2";

            this.oApplication.ItemEvent += OApplication_ItemEvent;

            this.oForm.Visible = true;
        }
コード例 #2
0
        public TabOrder()
        {
            AppHelper.SetApplication(ref this.oApplication);

            string strTmp = "TabOrder.srf";

            UIHelper.LoadFromXML(oApplication, ref strTmp);

            oForm  = oApplication.Forms.Item("frmTab");
            userDS = UserDataSourceHelper.AddUserDataSource(oForm, "OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);


            oItem         = oForm.Items.Item("optHor");
            oOptionBtnHor = ((SAPbouiCOM.OptionBtn)(oItem.Specific));
            oOptionBtnHor.GroupWith("optVer");
            oOptionBtnHor.DataBind.SetBound(true, "", "OpBtnDS");

            oItem = oForm.Items.Item("optVer");

            oOptionBtnVer = ((SAPbouiCOM.OptionBtn)(oItem.Specific));
            oOptionBtnVer.GroupWith("optHor");
            oOptionBtnVer.DataBind.SetBound(true, "", "OpBtnDS");

            oOptionBtnHor.Selected = true;
            SetTabHorizontal();



            oForm.Visible = true;

            oApplication.ItemEvent += OApplication_ItemEvent;
        }
コード例 #3
0
 private void AddDataSources()
 {
     UserDataSourceHelper.AddUserDataSource(this.oForm, "TabDS1", SAPbouiCOM.BoDataType.dt_SHORT_NUMBER, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDS1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDS2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDS3", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "CheckDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "ComboDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "LinkDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
     UserDataSourceHelper.AddUserDataSource(this.oForm, "PicDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);
 }
コード例 #4
0
        public Picker()
        {
            AppHelper.SetApplication(ref this.oApplication);

            this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Fixed, "PickerForm", "PickerForm", 150, 350, true, 0, "Exemplo de Selecionador", 0, 0, 100, 400);

            UserDataSourceHelper.AddUserDataSource(this.oForm, "DateDS", SAPbouiCOM.BoDataType.dt_DATE, 254);
            UserDataSourceHelper.AddUserDataSource(this.oForm, "CalcDS", SAPbouiCOM.BoDataType.dt_PRICE, 254);
            UserDataSourceHelper.AddUserDataSource(this.oForm, "CLFDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);

            AddChooseFromList();

            this.oForm.Visible = true;


            this.oForm.Freeze(true);

            this.oStaticHead = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticHead", 7, 350, 8, 44, "São 3 exemplos de selecionar Informações", "EditDate");

            this.oEditDate = UIHelper.AddEditTextAoFormulario(this.oForm, "EditDate", 157, 80, 65, 14, "", false, 0, 0);
            this.oEditDate.DataBind.SetBound(true, "", "DateDS");
            this.oStaticDate = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticDate", 7, 148, 65, 14, "Data:", "EditDate");

            this.oEditPrice = UIHelper.AddEditTextAoFormulario(this.oForm, "EditPrice", 157, 80, 46, 14, "", false, 0, 0);
            this.oEditPrice.DataBind.SetBound(true, "", "CalcDS");
            this.oStaticPrice = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatPrice", 7, 148, 46, 14, "Preço:", "EditPrice");



            this.oEditCLF = UIHelper.AddEditTextAoFormulario(this.oForm, "EditCLF", 157, 80, 85, 14, "", false, 0, 0);
            this.oEditCLF.DataBind.SetBound(true, "", "CLFDS");
            this.oEditCLF.ChooseFromListUID = "CFL1";
            this.oStaticCLF = UIHelper.AddStaticTextAoFormulario(this.oForm, "oStaticCLF", 7, 148, 85, 14, "CLF:", "EditCLF");

            this.oApplication.ItemEvent += OApplication_ItemEvent;

            this.oForm.Freeze(false);
        }
コード例 #5
0
        private void AddItemsToPVForm()
        {
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "OptBtnDS", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS1", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS2", BoDataType.dt_SHORT_TEXT, 1);
            UserDataSourceHelper.AddUserDataSource(this.oFormPV, "CheckDS3", BoDataType.dt_SHORT_TEXT, 1);

            //adcionar check box ao folder

            this.oItem = this.oFormPV.Items.Item("126");

            for (int i = 1; i <= 3; i++)
            {
                this.oCheckBox = UIHelper.AddCheckBoxAoFormulario(
                    this.oFormPV
                    , "CheckBox" + i.ToString()
                    , oItem.Left
                    , 100
                    , this.oItem.Top + (i - 1) * 19
                    , 19
                    , "Check Box" + i.ToString()
                    , true
                    , 5
                    , 5
                    );
                this.oCheckBox.DataBind.SetBound(true, "", "CheckDS" + i.ToString());
            }

            this.oItem = this.oFormPV.Items.Item("44");
            for (int i = 1; i <= 3; i++)
            {
                //this.oNewItem = this.oFormPV.Items.Add("OptBtn" + i.ToString(), BoFormItemTypes.it_OPTION_BUTTON);
                //this.oNewItem.Left = oItem.Left;
                //this.oNewItem.Width = 100;
                //this.oNewItem.Top = this.oItem.Top + (i - 1) * 19;
                //this.oNewItem.Height = 19;

                //this.oNewItem.FromPane = 5;
                //this.oNewItem.ToPane = 5;


                //this.oOptionBtn = (SAPbouiCOM.OptionBtn)oNewItem.Specific;
                //this.oOptionBtn.Caption = "Option Button" + i.ToString();
                //if (i > 1)
                //{
                //    oOptionBtn.GroupWith("OptBtn" + Convert.ToString(i - 1));

                //}

                this.oOptionBtn = UIHelper.AddOptionButtonAoFormulario(
                    this.oFormPV
                    , "OptBtn" + i.ToString()
                    , oItem.Left
                    , 100
                    , this.oItem.Top + (i - 1) * 19
                    , 19
                    , "OptBtn" + i.ToString()
                    , (i > 1) ? "OptBtn" + Convert.ToString(i - 1) : ""
                    , true
                    , 5
                    , 5
                    );


                this.oOptionBtn.DataBind.SetBound(true, "", "oPTBtnDS");
            }
        }
コード例 #6
0
        public MeuFormGrid()
        {
            AppHelper.SetApplication(ref this.oApplication);

            this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Sizable, "SAMPLE", "frmGrid", 0, 0, true, 0, "Exemplo de Grid UIAPI", 305, 650);
            this.oForm.Freeze(true);


            this.oStaticHeader = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatHeader"
                                                                    , 20, 500, 20, 0, "Em um novo grid você pode definir que os dados sejam agrupados e tenham uma árvore de colapso ");

            this.oStaticHead = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatHead"
                                                                  , 20, 500, 40, 0, "Neste grid você poderá ver todas as notas fiscias de venda Cadastradas");

            this.oBtnCo  = UIHelper.AddBotaoAoFormulario(this.oForm, "btnCol", 480, 0, 80, 0, "Collapse", false);
            this.oBtnExp = UIHelper.AddBotaoAoFormulario(this.oForm, "btnExp", 480, 0, 110, 0, "Expand", false);

            this.oStaticGroup = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatGroup"
                                                                   , 470, 80, 140, 0, "Agrupado ");

            userDS = UserDataSourceHelper.AddUserDataSource(this.oForm, "OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

            this.oOptNoGroup = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optNo"
                , 480
                , 120
                , 160
                , 0
                , "Sem Agrupamento"
                , ""
                , true
                , 0
                , 0
                );

            this.oOptNoGroup.DataBind.SetBound(true, "", "OpBtnDS");

            this.oOptCardCode = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optCode"
                , 480
                , 120
                , 180
                , 0
                , "Código do Cliente"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptCardCode.DataBind.SetBound(true, "", "OpBtnDS");

            this.oOptDocDate = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optDate"
                , 480
                , 120
                , 200
                , 0
                , " Data do Documento"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptDocDate.DataBind.SetBound(true, "", "OpBtnDS");


            this.oOptDocStatus = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optStatus"
                , 480
                , 120
                , 220
                , 0
                , " Status do Documento"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptDocStatus.DataBind.SetBound(true, "", "OpBtnDS");
            oItem        = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID);
            oItem.Left   = 20;
            oItem.Top    = 60;
            oItem.Width  = 430;
            oItem.Height = 200;

            oGrid = ((SAPbouiCOM.Grid)(oItem.Specific));

            oForm.DataSources.DataTables.Add("MyDataTable");
            oForm.DataSources.DataTables.Item(0).ExecuteQuery("select CardCode, DocDate, DocNum, DocTotal, DocStatus from OINV");
            oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable");

            oGrid.Columns.Item(0).Width = 50;
            oGrid.Columns.Item(1).Width = 60;
            oGrid.Columns.Item(2).Width = 130;
            for (int i = 0; i < oGrid.Columns.Count; i++)
            {
                oGrid.Columns.Item(1).Editable = false;
            }

            AtualizarTiposColunas();

            ColorirLinhas();

            this.oForm.Visible = true;

            this.oApplication.ItemEvent += OApplication_ItemEvent;
            this.oForm.Freeze(false);
        }