コード例 #1
0
 private void SetFocusItem20()
 {
     SAPbouiCOM.EditText oEdit = null;
     oItem       = oForm.Items.Item("20");
     oEdit       = ((SAPbouiCOM.EditText)(oItem.Specific));
     oEdit.Value = oEdit.Value;
 }
コード例 #2
0
        private void SetTabHorizontal()
        {
            this.oForm.Freeze(true);
            SAPbouiCOM.EditText oEdit = null;
            int t = 0, left = 0, diff = 0, right = 0;

            left  = 1;
            right = 2;
            diff  = 100;
            for (int i = 20; i <= 29; i++)
            {
                oItem = oForm.Items.Item(i.ToString());
                oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));
                if (i < 25)
                {
                    oEdit.TabOrder = left + diff;
                    left           = left + 2;
                }
                else
                {
                    oEdit.TabOrder = right + diff;
                    right          = right + 2;
                }
                oEdit.Value = oEdit.TabOrder.ToString();
            }

            SetFocusItem20();
            this.oForm.Freeze(false);
        }
コード例 #3
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;
        }
コード例 #4
0
        public void GetItemReferences()
        {
            try
            {
                _oForm.Freeze(false);
                _cbARINV       = _oForm.Items.Item("cbARINV").Specific as SAPbouiCOM.CheckBox;
                _cbARCN        = _oForm.Items.Item("cbARCN").Specific as SAPbouiCOM.CheckBox;
                _cbAPINV       = _oForm.Items.Item("cbAPINV").Specific as SAPbouiCOM.CheckBox;
                _cbAPCN        = _oForm.Items.Item("cbAPCN").Specific as SAPbouiCOM.CheckBox;
                _txtDTFRM      = _oForm.Items.Item("txtDTFRM").Specific as SAPbouiCOM.EditText;
                _txtDTTO       = _oForm.Items.Item("txtDTTO").Specific as SAPbouiCOM.EditText;
                _btnView       = _oForm.Items.Item("btnView").Specific as SAPbouiCOM.Button;
                _btnCP         = _oForm.Items.Item("btnCP").Specific as SAPbouiCOM.Button;
                _txtPath       = _oForm.Items.Item("txtPath").Specific as SAPbouiCOM.EditText;
                _btnExport     = _oForm.Items.Item("btnExport").Specific as SAPbouiCOM.Button;
                _grid_Trans    = _oForm.Items.Item("grid_Trans").Specific as SAPbouiCOM.Grid;
                _dt_grid_Trans = _oForm.DataSources.DataTables.Item("grid_Trans");

                _btnView.PressedAfter   += _btnView_PressedAfter;
                _btnExport.PressedAfter += _btnExport_PressedAfter;
                // Double click events
                _grid_Trans.DoubleClickAfter += _grid_Trans_DoubleClickAfter;
                _btnCP.PressedAfter          += _btnCP_PressedAfter;
            }
            catch (Exception Ex) { eCommon.SBO_Application.MessageBox(Ex.Message); }
        }
コード例 #5
0
ファイル: frm_ProdList.cs プロジェクト: ubaidmughal/SAP
        public override void etAfterKeyDown(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent)
        {
            base.etAfterKeyDown(ref pVal, ref BubbleEvent);
            if (pVal.ItemUID == "txProduct")
            {
                fillReport();
            }
            if (pVal.ItemUID == mtReport.Item.UniqueID && pVal.Row <= mtReport.RowCount)
            {
                if (pVal.CharPressed == (int)System.Windows.Forms.Keys.Enter || pVal.CharPressed == (int)System.Windows.Forms.Keys.Tab || pVal.CharPressed == (int)System.Windows.Forms.Keys.Up || pVal.CharPressed == (int)System.Windows.Forms.Keys.Down)
                {
                    if (pVal.Row <= mtReport.RowCount)
                    {
                        int selRowIndex = pVal.Row - 1;

                        mtReport.FlushToDataSource();
                        string DocEntry            = Convert.ToString(dtRpt.GetValue("DocEntry", selRowIndex));
                        string Seq                 = Convert.ToString(dtRpt.GetValue("Seq", selRowIndex));
                        string FreeText            = Convert.ToString(dtRpt.GetValue("FreeText", selRowIndex));
                        string prodLine            = Convert.ToString(dtRpt.GetValue("ProdLine", selRowIndex));
                        SAPbouiCOM.EditText newSeq = (SAPbouiCOM.EditText)mtReport.Columns.Item("cSeq").Cells.Item(pVal.Row).Specific;
                        UpdateSeq(Convert.ToInt32(DocEntry), Convert.ToInt32(newSeq.Value), prodLine);
                        if (pVal.Row < mtReport.RowCount)
                        {
                            SAPbouiCOM.EditText nextSeq = (SAPbouiCOM.EditText)mtReport.Columns.Item("cSeq").Cells.Item(pVal.Row + 1).Specific;
                            nextSeq.Value  = nextSeq.Value;
                            nextSeq.Active = true;
                        }
                    }
                }
            }
        }
コード例 #6
0
        private void ComboBox3_ComboSelectBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal)
        {
            //utilizamos los recorset mas que nada para recorrer la query que llena los textbox
            SAPbobsCOM.Recordset oRecordset     = ((SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)));
            SAPbouiCOM.ComboBox  oComboApproval = (SAPbouiCOM.ComboBox)oForm.Items.Item("cmbctbc").Specific;
            if (oComboApproval.Value.Trim() != "")
            {
                SAPbouiCOM.EditText oEditStatus  = (SAPbouiCOM.EditText)oForm.Items.Item("txtsucur").Specific;
                SAPbouiCOM.EditText oEditStatus2 = (SAPbouiCOM.EditText)oForm.Items.Item("txtbics").Specific;
                SAPbouiCOM.EditText oEditStatus3 = (SAPbouiCOM.EditText)oForm.Items.Item("txtcotbn").Specific;
                string SqlCad5 = "select distinct DSC1.BRANCH as sucursal , DSC1.SwiftNum as Swift,ControlKey as control   from DSC1 inner join ODSC ON DSC1.BankCode=ODSC.BankCode  where DSC1.BankCode=" + ComboBox1.Value.ToString() + "";
                //   oApp.SetStatusBarMessage("El dato es " + SqlCad5);
                oRecordset.DoQuery(SqlCad5);
                string Extraerdequery  = oRecordset.Fields.Item("sucursal").Value.ToString();
                string Extraerdequery2 = oRecordset.Fields.Item("Swift").Value.ToString();
                string Extraerdequery3 = oRecordset.Fields.Item("control").Value.ToString();
                oEditStatus.Value  = Extraerdequery;
                oEditStatus2.Value = Extraerdequery2;
                oEditStatus3.Value = Extraerdequery3;

                //cargamos el IBAN
                CleanComboBox(ComboBox5);
                string SqlCad6 = "select distinct DSC1.IBAN  from DSC1  inner join ODSC ON DSC1.BankCode=DSC1.BankCode  where DSC1.BankCode='" + ComboBox1.Value.ToString() + "'";
                // oApp.SetStatusBarMessage("El dato es " + ComboBox3.Value.ToString());
                LoadComboQueryRecordset(SqlCad6, ComboBox5, "IBAN", "", oCompany);
            }
        }
コード例 #7
0
        private void Button0_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("Item_2").Specific;

            if (oForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE)
            {
                if (oEdit.Value.Trim().Length == 0)
                {
                    Application.SBO_Application.StatusBar.SetText("Debe Seleccionar el Empleado que Recibe", SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    BubbleEvent = false;
                }
                else
                {
                    if (EditText1.Value.Trim().Length > 0)
                    {
                        if (!DT_SQL.IsEmpty)
                        {
                            string  nOrden = "";
                            string  nLinea = "";
                            decimal nCant  = 0;

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

                            for (int i = 0; i < oMatrix.RowCount - 1; i++)
                            {
                                nOrden = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("231000074").Cells.Item(i).Specific).Value;
                                nLinea = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("24").Cells.Item(i).Specific).Value;
                                nCant  = Convert.ToDecimal(((SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(i).Specific).Value);
                            }
                        }
                    }
                }
            }
        }
コード例 #8
0
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.StaticText0              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_0").Specific));
     this.StaticText1              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_1").Specific));
     this.StaticText2              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_2").Specific));
     this.CheckBoxImpresion        = ((SAPbouiCOM.CheckBox)(this.GetItem("chkImp").Specific));
     this.StaticText3              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_4").Specific));
     this.EditTextDocDesde         = ((SAPbouiCOM.EditText)(this.GetItem("docDesde").Specific));
     this.StaticText4              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_6").Specific));
     this.EditTextDocHasta         = ((SAPbouiCOM.EditText)(this.GetItem("docHasta").Specific));
     this.CBoxTpoEstado            = ((SAPbouiCOM.ComboBox)(this.GetItem("tpoEstado").Specific));
     this.CBoxtpoRuta              = ((SAPbouiCOM.ComboBox)(this.GetItem("tpoRuta").Specific));
     this.CBoxtpoRuta.ClickBefore += new SAPbouiCOM._IComboBoxEvents_ClickBeforeEventHandler(this.CBoxtpoRuta_ClickBefore);
     this.StaticText5              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_10").Specific));
     this.StaticText6              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_11").Specific));
     this.EditTextFechaDesde       = ((SAPbouiCOM.EditText)(this.GetItem("FechaD").Specific));
     this.StaticText7              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_13").Specific));
     this.EditTextFechaHasta       = ((SAPbouiCOM.EditText)(this.GetItem("FechaH").Specific));
     this.oGrid = ((SAPbouiCOM.Grid)(this.GetItem("Grid").Specific));
     this.oGrid.LinkPressedBefore    += new SAPbouiCOM._IGridEvents_LinkPressedBeforeEventHandler(this.oGrid_LinkPressedBefore);
     this.oGrid.LinkPressedAfter     += new SAPbouiCOM._IGridEvents_LinkPressedAfterEventHandler(this.oGrid_LinkPressedAfter);
     this.oGrid.DoubleClickBefore    += new SAPbouiCOM._IGridEvents_DoubleClickBeforeEventHandler(this.oGrid_DoubleClickBefore);
     this.oGrid.DoubleClickAfter     += new SAPbouiCOM._IGridEvents_DoubleClickAfterEventHandler(this.oGrid_DoubleClickAfter);
     this.ButtonBuscar                = ((SAPbouiCOM.Button)(this.GetItem("bBuscar").Specific));
     this.ButtonBuscar.ClickBefore   += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.ButtonBuscar_ClickBefore);
     this.ButtonImprimir              = ((SAPbouiCOM.Button)(this.GetItem("bImprimir").Specific));
     this.ButtonImprimir.ClickAfter  += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.ButtonImprimir_ClickAfter);
     this.ButtonImprimir.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.ButtonImprimir_ClickBefore);
     this.ButtonCancelar              = ((SAPbouiCOM.Button)(this.GetItem("bCancelar").Specific));
     this.ButtonCancelar.ClickAfter  += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.ButtonCancelar_ClickAfter);
     this.ButtonCancelar.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.ButtonCancelar_ClickBefore);
     this.CheckBox1 = ((SAPbouiCOM.CheckBox)(this.GetItem("chk_sel").Specific));
     this.OnCustomInitialize();
 }
コード例 #9
0
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.mtxItems                       = ((SAPbouiCOM.Matrix)(this.GetItem("mtxItems").Specific));
     this.txtDocNo                       = ((SAPbouiCOM.EditText)(this.GetItem("txtDocNo").Specific));
     this.dtTransferItemLines            = this.UIAPIRawForm.DataSources.DBDataSources.Item(string.Format("@{0}", TableNames.TransferItemsLines));
     this.dpDocDate                      = ((SAPbouiCOM.EditText)(this.GetItem("dpDocDate").Specific));
     this.mtxItems.ChooseFromListBefore += new SAPbouiCOM._IMatrixEvents_ChooseFromListBeforeEventHandler(this.mtxItems_ChooseFromListBefore);
     this.mtxItems.ChooseFromListAfter  += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxItems_ChooseFromListAfter);
     this.mtxItems.ClickBefore          += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxItems_ClickBefore);
     this.btnSave                      = ((SAPbouiCOM.Button)(this.GetItem("1").Specific));
     this.btnSave.ClickBefore         += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSave_ClickBefore);
     this.btnSave.PressedBefore       += new SAPbouiCOM._IButtonEvents_PressedBeforeEventHandler(this.btnSave_PressedBefore);
     this.btnCancel                    = ((SAPbouiCOM.Button)(this.GetItem("2").Specific));
     this.fldrItems                    = ((SAPbouiCOM.Folder)(this.GetItem("Item_5").Specific));
     this.fldrCosts                    = ((SAPbouiCOM.Folder)(this.GetItem("Item_6").Specific));
     this.mtxCost                      = ((SAPbouiCOM.Matrix)(this.GetItem("Item_7").Specific));
     this.mtxCost.ChooseFromListAfter += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxCost_ChooseFromListAfter);
     this.mtxCost.ClickBefore         += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxCost_ClickBefore);
     //this.btnCalculate = ((SAPbouiCOM.Button)(this.GetItem("btnClc").Specific));
     //this.btnCalculate.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnCalculate_ClickAfter);
     //this.btnCalculate.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnCalculate_ClickBefore);
     this.btnAddRow                = ((SAPbouiCOM.Button)(this.GetItem("btnAddRow").Specific));
     this.btnAddRow.ClickBefore   += btnAddRow_ClickBefore;
     this.btnAddRow.ClickAfter    += btnAddRow_ClickAfter;
     this.mtxItems.ValidateBefore += mtxItems_ValidateBefore;
     this.OnCustomInitialize();
 }
コード例 #10
0
        /// <summary>
        /// Injects the comission button in the form
        /// </summary>
        private void AddComissionButton()
        {
            string lStrMatrixId = "38";
            string lStrTotalId  = "29";

            try
            {
                mObjForm.Freeze(true);
                if (mItmBtnCard == null)
                {
                    mItmBtnCard          = mObjForm.Items.Add("btnBnk", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
                    mItmBtnCard.Top      = mObjForm.Items.Item(lStrMatrixId).Top + 168;
                    mItmBtnCard.Left     = mObjForm.Items.Item(lStrMatrixId).Left;
                    mItmBtnCard.FromPane = 1;
                    mItmBtnCard.ToPane   = 1;
                    mItmBtnCard.Width    = 145;
                    (mItmBtnCard.Specific as SAPbouiCOM.Button).Caption      = "Comisión por pago con tarjeta";
                    (mItmBtnCard.Specific as SAPbouiCOM.Button).ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.mItmBtnCard_ClickBefore);
                }
                mEdtTotal = (mObjForm.Items.Item(lStrTotalId).Specific as SAPbouiCOM.EditText);
                mMtxLines = (mObjForm.Items.Item(lStrMatrixId).Specific as SAPbouiCOM.Matrix);
            }
            finally
            {
                mObjForm.Freeze(false);
            }
        }
コード例 #11
0
        private void OnCustomInitialize()
        {
            oApp     = (SAPbouiCOM.Application)Application.SBO_Application;
            oCompany = (SAPbobsCOM.Company)oApp.Company.GetDICompany();



            //busca con recorset los datos y los muestros en los textboxes
            SAPbobsCOM.Recordset oRecordset   = ((SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)));
            SAPbouiCOM.EditText  oEditStatus  = EditText1;
            SAPbouiCOM.EditText  oEditStatus2 = EditText2;
            SAPbouiCOM.EditText  oEditStatus3 = EditText3;
            //oApp.SetStatusBarMessage("El dato es..." + EditText0.Value);
            string SqlCad1 = "select t0.U_NombreEDC as 'Nombre',t0.U_ProyectoEDC as 'Proyecto',t1.U_NombrePyto as 'NombreProyecto' from [@EDICIONESCOL] as t0  left join [@PROYECTOSCOSTE] as t1 on t0.U_ProyectoEDC = (CAST (t1.U_CentroPyto AS VARCHAR) + '' + CAST (t1.U_DeptoPyto AS VARCHAR) + '' + CAST (t1.U_CodigoPyto AS VARCHAR)) where t0.U_CodigoEDC= '" + sValorGrid2 + "'";

            // oApp.SetStatusBarMessage("El dato es " + SqlCad1);
            oRecordset.DoQuery(SqlCad1);
            string Extraerdequery  = oRecordset.Fields.Item("Nombre").Value.ToString();
            string Extraerdequery2 = oRecordset.Fields.Item("Proyecto").Value.ToString();
            string Extraerdequery3 = oRecordset.Fields.Item("NombreProyecto").Value.ToString();

            oEditStatus.Value  = Extraerdequery;
            oEditStatus2.Value = Extraerdequery2;
            oEditStatus3.Value = Extraerdequery3;



            CleanComboBox(ComboBox0);
            string SqlCad = ("  SELECT CAST (U_CentroPyto AS VARCHAR) + '' + CAST (U_DeptoPyto AS VARCHAR) + '' + CAST (U_CodigoPyto AS VARCHAR) As Codigo,U_NombrePyto FROM [@PROYECTOSCOSTE]");

            // oApp.SetStatusBarMessage("El dato es " + SqlCad );
            LoadComboQueryRecordset(SqlCad, ComboBox0, "Codigo", "U_NombrePyto", oCompany);
        }
コード例 #12
0
 public void setFormEditVal(SAPbouiCOM.Form form, string id, string val, int paneFrom = 0, int paneTo = 0)
 {
     SAPbouiCOM.EditText oEt = null;
     try
     {
         oEt       = (SAPbouiCOM.EditText)form.Items.Item(id).Specific;
         oEt.Value = val;
         if (paneFrom != 0)
         {
             form.Items.Item(id).FromPane = paneFrom;
             form.Items.Item(id).ToPane   = paneTo;
         }
     }
     catch (Exception ex)
     {
         errorLog("setFormEditVal exceptionon ID " + id + ", val=" + val + ", error=" + ex.Message);
     }
     finally
     {
         try
         {
             if (oEt != null)
             {
                 System.Runtime.InteropServices.Marshal.ReleaseComObject(oEt);
             }
             oEt = null;
         }
         catch (Exception) { }
     }
 }
コード例 #13
0
        public void instanciarObjetosUI()
        {
            udsEstadoConfiguracion = mForm.DataSources.UserDataSources.Item(UDS_ESTADO_CONFIGURACION);
            udsEstadoSociedad      = mForm.DataSources.UserDataSources.Item(UDS_ESTADO_SOCIEDAD);
            udsCondicionSociedad   = mForm.DataSources.UserDataSources.Item(UDS_CONDICION_SOCIEDAD);
            udsEstadoOrden         = mForm.DataSources.UserDataSources.Item(UDS_EST_ORDR);
            udsEstadoPago          = mForm.DataSources.UserDataSources.Item(UDS_EST_ORCT);
            udsCondicionSociedad   = mForm.DataSources.UserDataSources.Item(UDS_CONDICION_SOCIEDAD);
            udsMotivoTraslado      = mForm.DataSources.UserDataSources.Item(UDS_MOTIVO_TRASLADO);
            edtSociedad            = mForm.Items.Item(EDT_SOCIEDAD).Specific;
            edtDescripcion         = mForm.Items.Item(EDT_DESCRIPCION).Specific;
            edtUsuario             = mForm.Items.Item(EDT_USUARIO).Specific;
            edtPassword            = mForm.Items.Item(EDT_PASSWORD).Specific;
            edtIdInterno           = mForm.Items.Item(EDT_IDINTERNO).Specific;
            edtMaxLineasOrdn       = mForm.Items.Item(EDT_MAXLINEAS).Specific;
            edtMotivoTraslado      = mForm.Items.Item(EDT_MOT_TRASLADO).Specific;
            cboEstado      = mForm.Items.Item(CBO_ESTADO).Specific;
            cboCondicion   = mForm.Items.Item(CBO_CONDICION).Specific;
            cboEstOrden    = mForm.Items.Item(CBO_EST_ORDR).Specific;
            cboEstPago     = mForm.Items.Item(CBO_EST_ORCT).Specific;
            btnRegistrar   = mForm.Items.Item(BTN_REGISTRAR).Specific;
            btnP1Siguiente = mForm.Items.Item(BTN_P1NEXT).Specific;

            edtCodigoMenu = mForm.Items.Item(EDT_CODIGO_MENU).Specific;
            edtDescrpMenu = mForm.Items.Item(EDT_DESCRIPCION_MENU).Specific;
            gridListaMenu = mForm.Items.Item(GRID_LISTA_MENU).Specific;
        }
コード例 #14
0
ファイル: frmRejectO.b1f.cs プロジェクト: xavl369/UGRS
        private void AddChooseFromList()
        {
            this.UIAPIRawForm.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254);

            try
            {
                SAPbouiCOM.EditText       lObjEditTxt = null;
                SAPbouiCOM.ChooseFromList lObjCFL     = null;

                SAPbouiCOM.ChooseFromListCollection lLstCFLs = null;
                lLstCFLs = this.UIAPIRawForm.ChooseFromLists;
                SAPbouiCOM.ChooseFromListCreationParams lObjCFLCreationParams = null;
                lObjCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SAPbouiCOM.Framework.Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);


                lObjCFLCreationParams.MultiSelection = false;
                lObjCFLCreationParams.ObjectType     = "2";
                lObjCFLCreationParams.UniqueID       = "CFLBP";
                lObjCFL = lLstCFLs.Add(lObjCFLCreationParams);

                //lObjEditTxt = lObjTxtClient;
                lObjTxtClient.DataBind.SetBound(true, "", "UDCFL");
                lObjTxtClient.ChooseFromListUID   = lObjCFL.UniqueID;
                lObjTxtClient.ChooseFromListAlias = "CardCode";
            }
            catch (Exception ex)
            {
                SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("InitCustomerChooseFromListException: {0}", ex.Message));
            }
        }
コード例 #15
0
        private void OnCustomInitialize()
        {
            //conexion  actual
            oApp     = (SAPbouiCOM.Application)Application.SBO_Application;
            oCompany = (SAPbobsCOM.Company)oApp.Company.GetDICompany();


            CleanComboBox(ComboBox0);
            string SqlCad = ("SELECT U_CodigoSS AS 'Código',U_NombreSS AS 'Nombre' FROM  [@SUPRASECCIONESCOL]");

            // oApp.SetStatusBarMessage("El dato es " + SqlCad );
            LoadComboQueryRecordset(SqlCad, ComboBox0, "Código", "Nombre", oCompany);



            //activamos el form para poder dar formato de moenda al campo precio
            oForm = oApp.Forms.Item("creasecc");
            //  Muestra el formulario
            oForm.Visible = true;
            //EditText2.Value = "0,00";
            //creamos un userdatasources , con estilo precio, luego se lo asignamos al campo precio (txtprsec)
            oForm.DataSources.UserDataSources.Add("VALORPRE", SAPbouiCOM.BoDataType.dt_PRICE, 0);
            SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("txtprsec").Specific;
            oEdit.DataBind.SetBound(true, "", "VALORPRE");
            //'Asignar Valor a EditText por Medio del UDS '
            SAPbouiCOM.UserDataSource oUserDataSource = oForm.DataSources.UserDataSources.Item("VALORPRE");
            oUserDataSource.ValueEx = "0.00";
        }
コード例 #16
0
ファイル: frmConfiguracion.b1f.cs プロジェクト: xavl369/UGRS
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.txtBDName      = ((SAPbouiCOM.EditText)(this.GetItem("txtBDName").Specific));
     this.txtDesc        = ((SAPbouiCOM.EditText)(this.GetItem("txtDesc").Specific));
     this.StaticText35   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_65").Specific));
     this.StaticText36   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_66").Specific));
     this.txtLogin       = ((SAPbouiCOM.EditText)(this.GetItem("txtLogin").Specific));
     this.txtPwd         = ((SAPbouiCOM.EditText)(this.GetItem("txtPwd").Specific));
     this.chkActivo      = ((SAPbouiCOM.CheckBox)(this.GetItem("chkActivo").Specific));
     this.txtServer      = ((SAPbouiCOM.EditText)(this.GetItem("txtServer").Specific));
     this.btnGuardarAsal = ((SAPbouiCOM.Button)(this.GetItem("Item_87").Specific));
     this.Folder1        = ((SAPbouiCOM.Folder)(this.GetItem("Item_74").Specific));
     this.Folder2        = ((SAPbouiCOM.Folder)(this.GetItem("Item_75").Specific));
     this.btnGdrNom      = ((SAPbouiCOM.Button)(this.GetItem("btn").Specific));
     this.StaticText42   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_76").Specific));
     this.StaticText43   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_77").Specific));
     this.StaticText44   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_78").Specific));
     this.txtBDNameAsal  = ((SAPbouiCOM.EditText)(this.GetItem("Item_79").Specific));
     this.txtDescAsal    = ((SAPbouiCOM.EditText)(this.GetItem("Item_80").Specific));
     this.StaticText45   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_81").Specific));
     this.StaticText46   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_82").Specific));
     this.txtLoginAsal   = ((SAPbouiCOM.EditText)(this.GetItem("Item_83").Specific));
     this.txtPwdAsal     = ((SAPbouiCOM.EditText)(this.GetItem("Item_84").Specific));
     this.chkActivoAsal  = ((SAPbouiCOM.CheckBox)(this.GetItem("Item_85").Specific));
     this.txtServAsal    = ((SAPbouiCOM.EditText)(this.GetItem("Item_86").Specific));
     this.StaticText47   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_88").Specific));
     this.txtCuentaCNom  = ((SAPbouiCOM.EditText)(this.GetItem("Item_90").Specific));
     this.txtServer.Item.Click();
     this.Folder1.Item.Click();
     this.InitChkBox();
     this.LoadApplicationEvents();
     this.StaticText49   = ((SAPbouiCOM.StaticText)(this.GetItem("Item_93").Specific));
     this.txtCuentaCAsal = ((SAPbouiCOM.EditText)(this.GetItem("Item_94").Specific));
 }
コード例 #17
0
        private void OnlyNumbers()
        {
            SAPbouiCOM.EditText lObjEditTxtOnlyNumbers = null;

            lObjEditTxtOnlyNumbers = (SAPbouiCOM.EditText)txtQuantity;

            lObjEditTxtOnlyNumbers.Value = Regex.Replace(lObjEditTxtOnlyNumbers.Value, @"[^0-9]", "");
        }
コード例 #18
0
        /// <summary>
        /// Saves references to items in the modal
        /// </summary>
        private void BindElements()
        {
            mCmbType   = ((SAPbouiCOM.ComboBox)mFrmDialog.Items.Item("cmbType").Specific);
            mEdtAmount = ((SAPbouiCOM.EditText)mFrmDialog.Items.Item("edtAmnt").Specific);
            mBtnGen    = ((SAPbouiCOM.Button)mFrmDialog.Items.Item("btnGen").Specific);

            mEdtDocNum = mFrmInvoice.Items.Item("8").Specific as SAPbouiCOM.EditText;
        }
コード例 #19
0
 /// <summary>
 /// Binds elements in the form-
 /// </summary>
 private void BindElements()
 {
     mCmbType                   = ((SAPbouiCOM.ComboBox)mObjModal.Items.Item("cmbType").Specific);
     mBtnAdd                    = ((SAPbouiCOM.Button)mObjModal.Items.Item("btnAdd").Specific);
     mEdtAmnt                   = ((SAPbouiCOM.EditText)mObjModal.Items.Item("edtAmnt").Specific);
     mBtnAdd.ClickBefore       += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.mBtnAdd_ClickBefore);
     mCmbType.ComboSelectAfter += new SAPbouiCOM._IComboBoxEvents_ComboSelectAfterEventHandler(this.mCmbType_ComboSelectAfter);
 }
コード例 #20
0
ファイル: Prefixes.b1f.cs プロジェクト: xavl369/UGRS
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.lObjCmbPrefixes = ((SAPbouiCOM.ComboBox)(this.GetItem("cbPrefix").Specific));
     this.lObjBtnAccept   = ((SAPbouiCOM.Button)(this.GetItem("BtnOk").Specific));
     this.StaticText0     = ((SAPbouiCOM.StaticText)(this.GetItem("Item_3").Specific));
     this.lObjETActiveP   = ((SAPbouiCOM.EditText)(this.GetItem("txtActive").Specific));
     this.OnCustomInitialize();
 }
コード例 #21
0
 public static void ActivateControl(this SAPbouiCOM.EditText control)
 {
     if (control != null)
     {
         control.Active = true;
     }
     control = null;
 }
コード例 #22
0
ファイル: GoodsReceive.b1f.cs プロジェクト: pbetkowski/Addon
 public override void OnInitializeComponent()
 {
     this.CountButton              = ((SAPbouiCOM.Button)(this.GetItem("Item_0").Specific));
     this.CountButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.CountButton_ClickBefore);
     this.EditText0 = ((SAPbouiCOM.EditText)(this.GetItem("Item_1").Specific));
     this.Matrix0   = ((SAPbouiCOM.Matrix)(this.GetItem("38").Specific));
     this.OnCustomInitialize();
 }
コード例 #23
0
        /// <summary>
        /// Initialize components. Called by framework after form created.
        /// </summary>
        ///

        public override void OnInitializeComponent()
        {
            this.Grid0 = ((SAPbouiCOM.Grid)(this.GetItem("Item_0").Specific));
            this.Grid0.DoubleClickAfter += new SAPbouiCOM._IGridEvents_DoubleClickAfterEventHandler(this.Grid0_DoubleClickAfter);
            this.Grid0.PressedAfter     += new SAPbouiCOM._IGridEvents_PressedAfterEventHandler(this.OnClickListener);
            this.Edit1 = ((SAPbouiCOM.EditText)(this.GetItem("Item_1").Specific));
            this.Edit1.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit1_DoubleClickBefore);
            this.StaticText0              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_2").Specific));
            this.Edit2 = ((SAPbouiCOM.EditText)(this.GetItem("Item_3").Specific));
            this.Edit2.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit2_DoubleClickBefore);
            this.StaticText1              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_4").Specific));
            this.StaticText2              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_5").Specific));
            this.Edit3 = ((SAPbouiCOM.EditText)(this.GetItem("Item_6").Specific));
            this.Edit3.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit3_DoubleClickBefore);
            this.StaticText3              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_7").Specific));
            this.Edit4 = ((SAPbouiCOM.EditText)(this.GetItem("Item_8").Specific));
            this.Edit4.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit4_DoubleClickBefore);
            this.StaticText4              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_9").Specific));
            this.Edit5 = ((SAPbouiCOM.EditText)(this.GetItem("Item_10").Specific));
            this.Edit5.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit5_DoubleClickBefore);
            this.StaticText5              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_11").Specific));
            this.Edit6 = ((SAPbouiCOM.EditText)(this.GetItem("Item_12").Specific));
            this.Edit6.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit6_DoubleClickBefore);
            this.StaticText6              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_13").Specific));
            this.Edit7 = ((SAPbouiCOM.EditText)(this.GetItem("Item_14").Specific));
            this.Edit7.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit7_DoubleClickBefore);
            this.StaticText7              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_15").Specific));
            this.Edit8 = ((SAPbouiCOM.EditText)(this.GetItem("Item_16").Specific));
            this.Edit8.DoubleClickBefore     += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.Edit8_DoubleClickBefore);
            this.FillTableButton              = ((SAPbouiCOM.Button)(this.GetItem("Item_17").Specific));
            this.FillTableButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.FillTableButton_ClickBefore);
            this.RefreshButton              = ((SAPbouiCOM.Button)(this.GetItem("Item_18").Specific));
            this.RefreshButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.ResetButton);
            this.ComboBox0 = ((SAPbouiCOM.ComboBox)(this.GetItem("Item_19").Specific));
            this.ComboBox0.ComboSelectAfter += new SAPbouiCOM._IComboBoxEvents_ComboSelectAfterEventHandler(this.ComboBox0_ComboSelectAfter);
            this.StaticText8              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_20").Specific));
            this.StaticText9              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_21").Specific));
            this.Grid1                    = ((SAPbouiCOM.Grid)(this.GetItem("Item_22").Specific));
            this.StaticText10             = ((SAPbouiCOM.StaticText)(this.GetItem("Item_23").Specific));
            this.Edit0                    = ((SAPbouiCOM.EditText)(this.GetItem("Item_24").Specific));
            this.Edit0.DoubleClickBefore += new SAPbouiCOM._IEditTextEvents_DoubleClickBeforeEventHandler(this.EditText8_DoubleClickBefore);
            this.LinkedButton0            = ((SAPbouiCOM.LinkedButton)(this.GetItem("Item_25").Specific));
            this.StaticText11             = ((SAPbouiCOM.StaticText)(this.GetItem("Item_26").Specific));
            this.Button2                  = ((SAPbouiCOM.Button)(this.GetItem("Item_27").Specific));
            this.Button2.ClickBefore     += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.Button2_ClickBefore);

            //
            this.listOfEditText = this.CM_Obj.addItemsToList(this.Edit0, this.Edit1, this.Edit2, this.Edit3, this.Edit4, this.Edit5, this.Edit6, this.Edit7, this.Edit8);
            //
            this.CountButton                = ((SAPbouiCOM.Button)(this.GetItem("Item_31").Specific));
            this.CountButton.ClickBefore   += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.CountTotal);
            this.GetItem("Item_31").Visible = false;
            this.GetItem("Item_19").Enabled = false;
            this.Grid2 = ((SAPbouiCOM.Grid)(this.GetItem("Item_32").Specific));
            this.AuthenticationButton              = ((SAPbouiCOM.Button)(this.GetItem("Item_29").Specific));
            this.AuthenticationButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.Button0_ClickBefore);
            this.OnCustomInitialize();
        }
コード例 #24
0
ファイル: frm_MRPD.cs プロジェクト: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            isForLoading = true;
            oForm.Freeze(true);

            tab1 = (SAPbouiCOM.Folder)oForm.Items.Item("21").Specific;
            tab3 = (SAPbouiCOM.Folder)oForm.Items.Item("19").Specific;
            tab4 = (SAPbouiCOM.Folder)oForm.Items.Item("35").Specific;

            dtHead  = oForm.DataSources.DataTables.Item("dtHead");
            Animals = oForm.DataSources.DataTables.Item("Animals");
            DTRpt   = oForm.DataSources.DataTables.Item("DTRpt");
            dtPro   = oForm.DataSources.DataTables.Item("dtPro");
            dtReqT  = oForm.DataSources.DataTables.Item("dtReqT");
            dtTypeS = oForm.DataSources.DataTables.Item("dtTypeS");


            ocflCard = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflCard");
            cflcardcode(ocflCard, "cflCard");


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

            mtRpt     = (SAPbouiCOM.Matrix)oForm.Items.Item("mtRpt").Specific;
            mtProd    = (SAPbouiCOM.Matrix)oForm.Items.Item("mtProd").Specific;
            mtTypePRO = (SAPbouiCOM.Matrix)oForm.Items.Item("mtTypePRO").Specific;


            cbAT = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbAT").Specific;
            cbAC = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbAC").Specific;


            txQtyT     = (SAPbouiCOM.EditText)oForm.Items.Item("29").Specific;
            txSupplier = (SAPbouiCOM.EditText)oForm.Items.Item("47").Specific;

            chSO  = (SAPbouiCOM.CheckBox)oForm.Items.Item("chSO").Specific;
            chPRO = (SAPbouiCOM.CheckBox)oForm.Items.Item("crRPRO").Specific;

            dtHead.Rows.Add(1);
            dtHead.SetValue("DocDate", 0, DateTime.Now);
            dtHead.SetValue("PoDate", 0, DateTime.Now);

            dtHead.SetValue("stDate", 0, DateTime.Now.AddDays(1));
            dtHead.SetValue("eDate", 0, DateTime.Now.AddDays(4));
            oForm.Freeze(false);
            fillCB();

            txQtyT.Item.Enabled = false;
            oForm.PaneLevel     = 4;
            tab4.Select();
            isForLoading = false;
            fillPO();
            mtProd.Item.Visible = false;
            fillAThash();
            RefreshForm();
        }
コード例 #25
0
ファイル: mfrmCFL.cs プロジェクト: radtek/UGRS_Full
        private void SetItems()
        {
            pObjBtnSelect = ((SAPbouiCOM.Button)lObjCFLModalForm.Items.Item("btnSelect").Specific);
            lObjBtnCancel = ((SAPbouiCOM.Button)lObjCFLModalForm.Items.Item("btnCancel").Specific);
            pObjMtxCFL    = ((SAPbouiCOM.Matrix)lObjCFLModalForm.Items.Item("mtxItems").Specific);
            lObjBtnSearch = ((SAPbouiCOM.Button)lObjCFLModalForm.Items.Item("btnSrch").Specific);
            lObjTxtSearch = ((SAPbouiCOM.EditText)lObjCFLModalForm.Items.Item("txtSrch").Specific);

            lObjCFLModalForm.DataSources.DataTables.Add("DsItems");
        }
コード例 #26
0
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.StaticText0           = ((SAPbouiCOM.StaticText)(this.GetItem("Item_0").Specific));
     this.StaticText1           = ((SAPbouiCOM.StaticText)(this.GetItem("Item_1").Specific));
     this.EditText0             = ((SAPbouiCOM.EditText)(this.GetItem("txt_frd").Specific));
     this.EditText1             = ((SAPbouiCOM.EditText)(this.GetItem("txt_tod").Specific));
     this.Button0               = ((SAPbouiCOM.Button)(this.GetItem("Item_4").Specific));
     this.Button0.PressedAfter += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button0_PressedAfter);
     this.OnCustomInitialize();
 }
コード例 #27
0
    private void PostPendEmail(String TemplateID, int i, SAPbouiCOM.Matrix oMatx, SAPbouiCOM.Form Oform)
    {
        String EbizKey    = "";
        bool   PostStatus = false;

        try
        {
            var             Menu = GetComboValue(Oform, cmbMenuString);
            PaymentResponse oPaymentResponse;

            if (Menu.Equals("Delete"))
            {
                oPaymentResponse = ebiz.DeleteEbizWebFormPayment(getToken(), TemplateID);
                if (oPaymentResponse.Status.Equals("Success"))
                {
                    PostStatus = true;
                }
                else
                {
                    PostStatus = false;
                }
            }
            else if (Menu.Equals("Send Email Reminder"))
            {//Delete
                var ReminderResp = ebiz.ResendEbizWebFormEmail(getToken(), TemplateID);
                if (ReminderResp.Equals("1"))
                {
                    PostStatus = true;
                }
                else
                {
                    PostStatus = false;
                }
            }

            if (PostStatus)
            {
                //SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oMatx.Columns.Item("clEbizkey").Cells.Item(i + 1).Specific;
                //oEdit.Value = EbizKey;
                SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oMatx.Columns.Item("clSync").Cells.Item(i + 1).Specific;
                oEdit.Value = "True";
                ShowSystemLog(String.Format("Done: Pending Email Row:{0} Selected Menu:{1}", i + 1, Menu));
            }
            else
            {
                SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oMatx.Columns.Item("clSync").Cells.Item(i + 1).Specific;
                oEdit.Value = "False";
                ShowSystemLog(String.Format("Issue: Pending Email Row:{0} Selected Menu:{1}", i + 1, Menu));
            }
        }
        catch (Exception ex)
        {
            errorLog(ex);
        }
    }
コード例 #28
0
ファイル: frm_ProdList.cs プロジェクト: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            initiallizing = true;


            dtRpt   = oForm.DataSources.DataTables.Item("dtRpt");
            dtHeads = oForm.DataSources.DataTables.Item("dtHeads");
            dtHeads.Rows.Add(1);
            mtReport = (SAPbouiCOM.Matrix)oForm.Items.Item("mtReport").Specific;
            btAct    = (SAPbouiCOM.ButtonCombo)oForm.Items.Item("btAct").Specific;
            btPL     = (SAPbouiCOM.ButtonCombo)oForm.Items.Item("btPL").Specific;

            btAct.ValidValues.Add("01", "Released");
            btAct.ValidValues.Add("02", "Canceled");


            opALL = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opAO").Specific;
            opREL = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opREL").Specific;
            opPL  = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opPL").Specific;

            opOd = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opOd").Specific;
            opDd = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opDd").Specific;

            opFirst = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opFirst").Specific;
            opLast  = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opLast").Specific;
            opX     = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opX").Specific;


            opREL.GroupWith("opAO");
            opPL.GroupWith("opAO");
            opDd.GroupWith("opOd");

            opLast.GroupWith("opFirst");
            opX.GroupWith("opFirst");
            // opLast.Selected = true;


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

            cbFilter = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbFilter").Specific;
            cbPL     = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbPL").Specific;
            cbPL.ValidValues.Add("0", "All");
            fillCbs();
            //  fillReport();
            oForm.Freeze(false);

            opALL.Selected  = true;
            opOd.Selected   = true;
            opLast.Selected = true;
            initiallizing   = false;
        }
コード例 #29
0
        private static void LoadInfo(SAPbouiCOM.Form oForm)
        {
            SAPbobsCOM.Recordset oRecordset = null;
            SAPbouiCOM.Matrix    oMatrix    = null;
            SAPbouiCOM.Matrix    oMatrixMm  = null;

            try
            {
                oForm.Freeze(true);
                oRecordset = Conexion_SBO.m_oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                oMatrixMm  = oForm.Items.Item("Mtx_Mn").Specific;
                oRecordset.DoQuery("SELECT \"DocNum\" FROM \"@SEI_SETVALH\" ");
                if (oRecordset.RecordCount > 0)
                {
                    SAPbouiCOM.EditText oedit = null;
                    oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
                    String docNUM = Convert.ToString(oRecordset.Fields.Item(0).Value);
                    oedit       = oForm.Items.Item("DocNum").Specific;
                    oedit.Value = docNUM;
                    oForm.EnableMenu("1281", false); // 1281 --> Buscar
                    oForm.EnableMenu("1282", false); // 1282 --> Crear
                    oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
                    oForm.Items.Item("DocNum").Enabled = false;
                    oForm.Items.Item("DocNum").Visible = false;
                    oMatrixMm.AddRow();
                }
                else
                {
                    oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE;
                    //oForm.Items.Item("DocNum").Enabled = false;
                    oForm.Items.Item("DocNum").Visible = false;
                    //oMatrix.AddRow(2);
                    ////lines
                    //((SAPbouiCOM.EditText)(oMatrix.Columns.Item("Col_0").Cells.Item(1).Specific)).Value = "Entrada de mercancias";
                    //((SAPbouiCOM.CheckBox)(oMatrix.Columns.Item("Col_1").Cells.Item(1).Specific)).Checked = true;
                    //((SAPbouiCOM.EditText)(oMatrix.Columns.Item("Col_2").Cells.Item(1).Specific)).Value = "1";
                    //((SAPbouiCOM.EditText)(oMatrix.Columns.Item("Col_0").Cells.Item(2).Specific)).Value = "Oferta de compra";
                    //((SAPbouiCOM.CheckBox)(oMatrix.Columns.Item("Col_1").Cells.Item(2).Specific)).Checked = true;
                    //((SAPbouiCOM.EditText)(oMatrix.Columns.Item("Col_2").Cells.Item(1).Specific)).Value = "2";

                    //((SAPbouiCOM.CheckBox)(oForm.Items.Item("cbSentAcep").Specific)).Checked = true;

                    oMatrixMm.AddRow();
                    ((SAPbouiCOM.EditText)(oMatrixMm.Columns.Item("Col_0").Cells.Item(1).Specific)).Value = "0";
                    ((SAPbouiCOM.EditText)(oMatrixMm.Columns.Item("Col_1").Cells.Item(1).Specific)).Value = "0";
                }
                //oForm.Items.Item("Mtx1").Visible = false;
                oForm.Freeze(false);
            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
            }
        }
コード例 #30
0
        /// <summary>
        /// Get the value selected
        /// </summary>
        /// <param name="editText">The EditText item</param>
        /// <param name="error_msg">Add a personal message in the exception</param>
        /// <returns>Values object</returns>
        public static klib.Dynamic GetValue(ref SAPbouiCOM.EditText editText, string error_msg = null)
        {
            var val = new klib.Dynamic(editText.Value);

            if (val.IsEmpty)
            {
                throw new SUIException(4, editText.Item.Description, "EditText", error_msg);
            }

            return(val);
        }
コード例 #31
0
ファイル: SystemForm1.b1f.cs プロジェクト: NBS-RHitch/TEST2
 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     this.EditText0 = ((SAPbouiCOM.EditText)(this.GetItem("14").Specific));
     this.EditText0.ValidateAfter += new SAPbouiCOM._IEditTextEvents_ValidateAfterEventHandler(this.EditText0_ValidateAfter);
     this.EditText1 = ((SAPbouiCOM.EditText)(this.GetItem("46").Specific));
     this.EditText1.ValidateAfter += new SAPbouiCOM._IEditTextEvents_ValidateAfterEventHandler(this.EditText1_ValidateAfter);
     this.Button0 = ((SAPbouiCOM.Button)(this.GetItem("Item_1").Specific));
     this.Button0.PressedAfter += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button0_PressedAfter);
     this.EditText2 = ((SAPbouiCOM.EditText)(this.GetItem("Item_0").Specific));
     this.EditText2.PressedAfter += new SAPbouiCOM._IEditTextEvents_PressedAfterEventHandler(this.EditText2_PressedAfter);
     this.EditText2.ValidateBefore += new SAPbouiCOM._IEditTextEvents_ValidateBeforeEventHandler(this.EditText2_ValidateBefore);
     this.OnCustomInitialize();
 }
コード例 #32
0
        /// <summary>
        /// Initialize components. Called by framework after form created.
        /// </summary>
        public override void OnInitializeComponent()
        {
            this.btnSave = ((SAPbouiCOM.Button)(this.GetItem("1").Specific));
            this.btnSave.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSave_ClickBefore);
            this.btnCancel = ((SAPbouiCOM.Button)(this.GetItem("2").Specific));
            this.lblCode = ((SAPbouiCOM.StaticText)(this.GetItem("lblCode").Specific));
            this.lblName = ((SAPbouiCOM.StaticText)(this.GetItem("lblName").Specific));
            this.txtCode = ((SAPbouiCOM.EditText)(this.GetItem("txtCode").Specific));
            this.txtName = ((SAPbouiCOM.EditText)(this.GetItem("txtName").Specific));
            this.lblType = ((SAPbouiCOM.StaticText)(this.GetItem("lblType").Specific));
            this.cbTypes = ((SAPbouiCOM.ComboBox)(this.GetItem("cbTypes").Specific));
            this.lblDoc = ((SAPbouiCOM.StaticText)(this.GetItem("lblDoc").Specific));
            this.txtDocEntry = ((SAPbouiCOM.EditText)(this.GetItem("txtDoc").Specific));
            this.OnCustomInitialize();

        }
コード例 #33
0
        private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
        {
            SAPbouiCOM.BoEventTypes EventEnum = 0;
            EventEnum = pVal.EventType;
            BubbleEvent = true;

            if (pVal.FormType == 320)
            {
                if ((pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (!pVal.Before_Action))
                {
                    //Laudo_Ini
                    if (pVal.ItemUID == "Laudo_Ini")
                    {
                        abrirRelatorio("Laudo inicial", oForm.Items.Item("74").Specific.Value);
                    }

                    //Ent_Imp
                    if (pVal.ItemUID == "Ent_Imp")
                    {
                        abrirRelatorio("Descricao dos ambientes", oForm.Items.Item("74").Specific.Value);
                    }

                    //Laudo_Int
                    if (pVal.ItemUID == "Laudo_Int")
                    {
                        abrirRelatorio("Laudo intermediario", oForm.Items.Item("74").Specific.Value);
                    }
                    //NvAnalise
                    if (pVal.ItemUID == "NvAnalise")
                    {
                        abrirRelatorio("Analise critica", oForm.Items.Item("74").Specific.Value);
                    }
                    //Laudo_ent
                    if (pVal.ItemUID == "Laudo_Ent")
                    {
                        abrirRelatorio("Laudo de entrega", oForm.Items.Item("74").Specific.Value);
                    }
                    //Pesquisa de satisfacao
                    if (pVal.ItemUID == "Etg_Pq")
                    {
                        abrirRelatorio("Pesquisa de satisfacao", oForm.Items.Item("74").Specific.Value);
                    }
                    //NvLev
                    if (pVal.ItemUID == "NvLev")
                    {
                        abrirRelatorio("Levantamento", "");
                    }
                    //Etg_Decl
                    if (pVal.ItemUID == "Etg_Decl")
                    {
                        abrirRelatorio("Declaracao de conformidade", oForm.Items.Item("74").Specific.Value);
                    }

                }

                // Ao mudar o ambiente
                if (pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged)
                {
                    // Verifica a descricao de Ent_Det se mudou e captura
                    oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific);
                    string sEnt_Det = oEditItem.String;
                    try
                    {
                        if (sEnt_Det != sDescricaoOriginalAmbiente)
                        {
                            int idOOPR = int.Parse(((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value);
                            string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value;
                            int iSelectedValue;
                            if (selectedValue != "")
                            {
                                iSelectedValue = int.Parse(selectedValue);
                                // Atualiza a Descrição na Oportunidade de Vendas
                                AddOportunidadeVendas(idOOPR, "0", "0", "0", iSelectedValue, sEnt_Det);
                            }
                        }
                    }
                    catch
                    {
                    }
                }

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged)
                {
                    oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific);

                    string idOOPR = ((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value;
                    string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value;

                    ambiente = new Ambiente(idOOPR);
                    oEditItem.Value = ambiente.getDescricaoEntrevista(selectedValue);
                }

                //Evento da Drop.

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ela_Amb"))
                {
                    string coluna2 = pVal.ColUID;
                    if (coluna2 == "Ela_Amb_C2")
                    {
                        string linha = pVal.Row.ToString();
                    }
                }

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Proj"))
                {
                    upProjEnt = true;
                    //SBO_Application.MessageBox("Mudou Proj Entrevista.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Med_Proj"))
                {
                    upProjMed = true;
                    //SBO_Application.MessageBox("Mudou Proj Medição.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Apr_Proj"))
                {
                    upProjAps = true;
                    //SBO_Application.MessageBox("Mudou Proj Apresentação.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Amb"))
                {
                    upEtvAmb = true;
                    //SBO_Application.MessageBox("Mudou Combo de Ambiente");
                }

                //Abre tela de Atividades.
                if (((pVal.ItemUID == "Ent_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    bBotaoAgendarFoiClicado = true;
                    SBO_Application.ActivateMenuItem("2563");
                }

                //Abre tela de Atividades.
                if (((pVal.ItemUID == "Med_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    bBotaoAgendarFoiClicado = true;
                    SBO_Application.ActivateMenuItem("2563");
                }

                //Clique do Botão Atualizar
                if (((pVal.ItemUID == "1") & (pVal.FormMode == 1) & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    if (ambiente.possuiAmbientesCadastrados())
                    {
                       Atualizar();
                    }
                }

                //Criar os campos do formulario.
                if (pVal.Before_Action && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                {
                    oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                    AddItemsToForm();

                    oForm.Resize(300, 130);// (132, 100);

                    resumo = new Resumo(oForm);
                    fases = new Fases(oForm);
                }

                //Evento do Clique da aba Resumo.
                if (pVal.ItemUID == "Projeto1" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    resumo.disableCampos();
                    oForm.PaneLevel = 8;
                }

                //Evento do Clique da aba Fases.
                if (pVal.ItemUID == "Projeto2" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    oForm.PaneLevel = 9;
                }

                int panel = 9;
                if (pVal.ItemUID.StartsWith("Folder") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    switch (pVal.ItemUID)
                    {
                        case "Folder1": panel = 9;
                            break;
                        case "Folder2": panel = 10;
                            break;
                        case "Folder3": panel = 11;
                            break;
                        case "Folder4": panel = 12;
                            break;
                        case "Folder5": panel = 13;
                            break;
                        case "Folder6": panel = 14;
                            break;
                        case "Folder7": panel = 15;
                            break;
                        case "Folder8": panel = 16;
                            break;
                        case "Folder9": panel = 17;
                            break;
                    }

                    oForm.PaneLevel = panel;
                }

                if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
                {
                    SAPbouiCOM.IChooseFromListEvent oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal));
                    string sCFL_ID = oCFLEvento.ChooseFromListUID;
                    SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(FormUID);
                    SAPbouiCOM.ChooseFromList oCFL = oForm.ChooseFromLists.Item(sCFL_ID);

                    if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL1")
                    {
                        SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
                        string valItemName = null;
                        string valItemCode = null;
                        try
                        {
                            valItemCode = System.Convert.ToString(oDataTable.GetValue(0, 0));
                            valItemName = System.Convert.ToString(oDataTable.GetValue(1, 0));

                            string qtdEstoque = GetQtdEmEstoque(valItemCode);
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).Value = qtdEstoque;

                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C0").Cells.Item(pVal.Row).Specific).Value = valItemCode;
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C1").Cells.Item(pVal.Row).Specific).Value = valItemName;
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                    else if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL2")
                    {
                        SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
                        string valCarName = null;
                        string idFornecedor = null;
                        try
                        {
                            idFornecedor = System.Convert.ToString(oDataTable.GetValue(0, 0));
                            valCarName = System.Convert.ToString(oDataTable.GetValue(1, 0));

                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C6").Cells.Item(pVal.Row).Specific).Value = idFornecedor;
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C3").Cells.Item(pVal.Row).Specific).Value = valCarName;
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }

                string coluna = pVal.ColUID;

                if (EventEnum == SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK && !pVal.BeforeAction)
                {
                    //Anexo de arquivo
                    if (coluna == "Ela_Amb_C7" || coluna == "Ela_Amb_C8" || coluna == "Ela_Amb_C9" || coluna == "Med_Amb_C1"
                                               || coluna == "Apv_Amb_C3" || coluna == "Ped_Amb_C7" || coluna == "Det_Amb_C7"
                                               || coluna == "Etg_Amb_C3" || coluna == "Mon_Amb_C3" || coluna == "Mon_Amb_C4"
                                               || coluna == "Mon_Amb_C5" || coluna == "Apv_Amb_C4" || coluna == "Ans_Amb_C0")
                    {
                        oNewItem = oForm.Items.Item(pVal.ItemUID);
                        oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                        oEditItem = (SAPbouiCOM.EditText)oMatrix.Columns.Item(coluna).Cells.Item(pVal.Row).Specific;

                        GridComAnexo(oEditItem);
                    }

                    //Url
                    if (coluna == "Ped_Amb_C8" && ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value != "")
                    {
                        newProcess = new Process();
                        string valor = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value;
                        info = new ProcessStartInfo(valor);
                        newProcess.StartInfo = info;
                        newProcess.Start();

                    }
                }

                if (EventEnum == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && !pVal.BeforeAction)
                {
                    if (coluna == "Cmp_Amb_C2")
                    {
                        oNewItem = oForm.Items.Item("Det_Cmp");
                        oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                        string qtd = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C2").Cells.Item(pVal.Row).Specific).String;
                        decimal teste = Convert.ToDecimal(qtd);
                        string estoque = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).String;
                        decimal teste2 = Convert.ToDecimal(estoque);
                        if (qtd != "" && teste > teste2)
                        {
                            SBO_Application.MessageBox("Sem ítens sufucintes no estoque");
                        }
                    }
                }

                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Apr_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0)
                {

                    if (modificouAnsCritica)
                    {
                        SBO_Application.MessageBox("Vai atualizar");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        modificouAnsCritica = false;
                    }

                    //Instancia a matriz de ambiente da aba apresentação.
                    oNewItem = oForm.Items.Item("Apr_Amb");
                    SAPbouiCOM.Matrix matrixApresentacao;
                    matrixApresentacao = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de análise crítica da aba apresentação.
                    oNewItem = oForm.Items.Item("Ans_Amb");
                    SAPbouiCOM.Matrix matrixAnaliseCritica;
                    matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores pra o ambiente na matriz de análise crítica.
                    oColumnsAnaliseCritica = matrixAnaliseCritica.Columns;
                    oColumnAnaliseCritica = oColumnsAnaliseCritica.Item("Ans_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C2").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C0").Cells.Item(pVal.Row).Specific;
                    idAmbiente = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    //Mostra na matriz de análise crítica qual ambiente selecionado.
                    oColumnAnaliseCritica.TitleObject.Caption = "Analise Crítica (" + nomeGrid + ")";
                    LoadGridAnaliseCritica();
                    countMatrixAnaliseCriticaAntes = matrixAnaliseCritica.RowCount;

                    if (matrixAnaliseCritica.RowCount == 0)
                    {
                        matrixAnaliseCritica.AddRow(1, 1);
                    }
                }
                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Ans_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ans_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Ans_Amb");
                    SAPbouiCOM.Matrix matrixAnaliseCritica;
                    matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixAnaliseCritica.RowCount > 0 && nome != "")
                    {
                        matrixAnaliseCritica.AddRow(1, matrixAnaliseCritica.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C1").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Ans_Amb" && pVal.ColUID == "Ans_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste");
                    modificouAnsCritica = true;
                }

                if (!pVal.BeforeAction && pVal.ItemUID == "Fab_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Fab_#" && pVal.Row > 0)
                {
                    if (bGravouAvarias)
                    {
                        SBO_Application.MessageBox("Vai atualizar Avarias");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        bGravouAvarias = false;
                    }

                    oNewItem = oForm.Items.Item("Fab_Amb");
                    SAPbouiCOM.Matrix matrixFabrica;
                    matrixFabrica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oNewItem = oForm.Items.Item("Ava_Amb");
                    SAPbouiCOM.Matrix matrixAvarias;
                    matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    SAPbouiCOM.Columns oColumnsAvarias = null;
                    SAPbouiCOM.Column oColumnAvarias = null;
                    oColumnsAvarias = matrixAvarias.Columns;
                    oColumnAvarias = oColumnsAvarias.Item("Ava_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C4").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C0").Cells.Item(pVal.Row).Specific;
                    iRowAmbiente = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    oColumnAvarias.TitleObject.Caption = "Descrição (" + nomeGrid + ")";
                    LoadGridAvarias();
                    countMatrixAvariasAntes = matrixAvarias.RowCount;

                    if (matrixAvarias.RowCount == 0)
                    {
                        matrixAvarias.AddRow(1, 1);
                    }
                }

                if (!pVal.BeforeAction && pVal.ItemUID == "Ava_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ava_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Ava_Amb");
                    SAPbouiCOM.Matrix matrixAvarias;
                    matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixAvarias.RowCount > 0 && nome != "")
                    {
                        matrixAvarias.AddRow(1, matrixAvarias.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C1").Cells.Item(matrixAvarias.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Ava_Amb" && pVal.ColUID == "Ava_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste Avarias");
                    bGravouAvarias = true;
                }

                //Evento da grid de ambiente/conferência medições.
                if (!pVal.BeforeAction && pVal.ItemUID == "Med_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0)
                {
                    //Instancia a matriz de ambiente da aba medições.
                    oNewItem = oForm.Items.Item("Med_Amb");
                    SAPbouiCOM.Matrix matrixMedicoes;
                    matrixMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de conferência medições da aba medições.
                    oNewItem = oForm.Items.Item("Med_Cnf");
                    SAPbouiCOM.Matrix matrixConferenciaMedicoes;
                    matrixConferenciaMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores para o ambiente na matriz de conferência medições.
                    oColumnsConferenciaMedicoes = matrixConferenciaMedicoes.Columns;
                    oColumnConferenciaMedicoes = oColumnsConferenciaMedicoes.Item("med_Cnf_C1");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C2").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C0").Cells.Item(pVal.Row).Specific;
                    iIdAmbienteMedicao = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    //Mostra na matriz de conferência medições qual ambiente selecionado.
                    oColumnConferenciaMedicoes.TitleObject.Caption = "Conferente (" + nomeGrid + ")";
                    LoadGridConferenciaMedicao();
                    countMatrixConfMedAntes = matrixConferenciaMedicoes.RowCount;

                    if (matrixConferenciaMedicoes.RowCount == 0)
                    {
                        matrixConferenciaMedicoes.AddRow(1, 1);
                        //Projetistas - Grid Conferencia de Medicao
                        loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas);
                    }
                }
                //Evento da grid de ambiente/conferência medições.
                if (pVal.CharPressed == 9 && !pVal.BeforeAction && pVal.ItemUID == "Med_Cnf" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "med_Cnf_C1")
                {
                    oNewItem = oForm.Items.Item("Med_Cnf");
                    SAPbouiCOM.Matrix matrixConferenciaMedicao;
                    matrixConferenciaMedicao = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific;
                    string data = oEditItem.String;
                    SAPbouiCOM.ComboBox combo = (SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific;
                    string nome = combo.Value;

                    if (matrixConferenciaMedicao.RowCount > 0 && data != "" && nome != "")
                    {
                        matrixConferenciaMedicao.AddRow(1, matrixConferenciaMedicao.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = "";
                        //Projetistas - Grid Conferencia de Medicao
                        RemoveValoresDeCombo(ref combo);
                        loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas);
                        ((SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Select("", SAPbouiCOM.BoSearchKey.psk_ByValue);
                        ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C2").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = "";

                    }
                }

                //Evento da grid de Entrega
                if (!pVal.BeforeAction && pVal.ItemUID == "Etg_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Etg_#" && pVal.Row > 0)
                {

                    if (modificouPendecia)
                    {
                        SBO_Application.MessageBox("Vai atualizar Pendencia");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        modificouPendecia = false;
                    }

                    //Instancia a matriz de ambiente da aba apresentação.
                    oNewItem = oForm.Items.Item("Etg_Amb");
                    SAPbouiCOM.Matrix matrixEntrega;
                    matrixEntrega = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de análise crítica da aba apresentação.
                    oNewItem = oForm.Items.Item("Pen_Amb");
                    SAPbouiCOM.Matrix matrixPendencia;
                    matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores pra o ambiente na matriz de Pendencia.
                    oColumnsPendencia = matrixPendencia.Columns;
                    oColumnPendencia = oColumnsPendencia.Item("Pen_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C6").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C0").Cells.Item(pVal.Row).Specific;
                    idAmbientePendencia = int.Parse(oEditItem.String);
                    string nomeAmbiente = oItemGrid.String;

                    //Mostra na matriz de Pendencia qual ambiente selecionado.
                    oColumnPendencia.TitleObject.Caption = "Ambiente (" + nomeAmbiente + ")";
                    LoadGridPendencias();
                    countMatrixPendenciaAntes = matrixPendencia.RowCount;

                    if (matrixPendencia.RowCount == 0)
                    {
                        matrixPendencia.AddRow(1, 1);
                    }
                }
                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Pen_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Pen_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Pen_Amb");
                    SAPbouiCOM.Matrix matrixPendencia;
                    matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixPendencia.RowCount > 0 && nome != "")
                    {
                        matrixPendencia.AddRow(1, matrixPendencia.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C1").Cells.Item(matrixPendencia.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Pen_Amb" && pVal.ColUID == "Pen_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste Pendencia");
                    modificouPendecia = true;
                }
            }

            if (pVal.FormType == 651)
            {
                if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD)
                {
                    oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                    if (pVal.ItemUID == "Ata_Ativ" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED & !pVal.Before_Action)
                    {
                        abrirRelatorio("Ata de reuniao", oFormAtual.Items.Item("5").Specific.Value);
                    }

                    if (!pVal.Before_Action && (pVal.EventType == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "67"))
                    {
                        if (oFormAtual.Items.Item("67").Specific.Value == "M")
                        {
                            atividade.habilitaBotaoAta();
                        }
                        else
                        {
                            atividade.desabilitaBotaoAta();
                        }
                    }

                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {

                        if (pVal.Before_Action)
                        {
                            atividade = new Atividade(oFormAtual);
                        }

                        if (bBotaoAgendarFoiClicado)
                        {
                            oFormPai = SBO_Application.Forms.GetFormByTypeAndCount(320, iUltimoFormTypeCount_SalesOpportunities);

                            sSalesOpportunities_Id = ((SAPbouiCOM.EditText)oFormPai.Items.Item("74").Specific).Value;
                            sBPCode = ((SAPbouiCOM.EditText)oFormPai.Items.Item("9").Specific).Value;

                            oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                            ((SAPbouiCOM.EditText)oFormAtual.Items.Item("9").Specific).Value = sBPCode;

                            bBotaoAgendarFoiClicado = false;
                        }
                    }
                }
            }
        }
コード例 #34
0
        private void LoadGridPendencias()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oDataTablePend").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oDataTablePend").ExecuteQuery("select * from [@FLX_FB_PEN] where U_FLX_FB_PEN_IDOOPR = '" + OpID + "'" + "and U_FLX_FB_PEN_IDAMB = '" + idAmbientePendencia + "'");

            oItem = oForm.Items.Item("Pen_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #35
0
 private void TransferItems_ActivateAfter(SAPbouiCOM.SBOItemEventArg pVal)
 {
     try
     {
         if (currentControl != null)
             currentControl.Active = true;
         currentControl = null;
     }
     catch(Exception ex)
     {
         Utilities.LogException(ex);
     }
 }
コード例 #36
0
        private void mtxItems_ChooseFromListAfter(object sboObject, SAPbouiCOM.SBOItemEventArg pVal)
        {
            try
            {
                mtxItems.FlushToDataSource();
                var colUid = pVal.ColUID;
                var row = pVal.Row;

                var selectedCFLItems = base.GetCFLSelectedItem(pVal);               

                if (selectedCFLItems != null)
                {
                    if (pVal.ColUID.Equals("to_Item"))
                    {
                        var selectedCFLItemCode = selectedCFLItems.GetValue("ItemCode", 0).ToString();
                        var selectedCFLItemName = selectedCFLItems.GetValue("ItemName", 0).ToString();

                        if (!selectedCFLItemCode.Equals(string.Empty))
                        {
                            var avgPrice = selectedCFLItems.GetValue("AvgPrice", 0);
                            mtxItems.SetCellWithoutValidation(row, "FromWhs", string.Empty);
                            mtxItems.SetCellWithoutValidation(row, "Quantity", string.Empty);
                            mtxItems.SetCellWithoutValidation(row, "IssueDesc", selectedCFLItemName);
                            mtxItems.SetCellValue("AvgPrice", row, avgPrice);
                            mtxItems.FlushToDataSource();
                        }
                    }
                    else if (pVal.ColUID.Equals("IssueDesc"))
                    {
                        var selectedCFLItemCode = selectedCFLItems.GetValue("ItemCode", 0).ToString();

                        if (!selectedCFLItemCode.Equals(string.Empty))
                        {
                            var avgPrice = selectedCFLItems.GetValue("AvgPrice", 0);
                            mtxItems.SetCellWithoutValidation(row, "FromWhs", string.Empty);
                            mtxItems.SetCellWithoutValidation(row, "Quantity", string.Empty);
                            mtxItems.SetCellWithoutValidation(row, "to_Item", selectedCFLItemCode);
                            mtxItems.SetCellValue("AvgPrice", row, avgPrice);
                            mtxItems.FlushToDataSource();
                        }
                    }
                    else if (pVal.ColUID.Equals("RecDesc"))
                    {
                        var selectedCFLItemCode = selectedCFLItems.GetValue("ItemCode", 0).ToString();
                        if (!selectedCFLItemCode.Equals(string.Empty))
                        {
                            mtxItems.SetCellWithoutValidation(row, "rec_Item", selectedCFLItemCode);
                            mtxItems.FlushToDataSource();
                        }
                    }
                    else if (pVal.ColUID.Equals("rec_Item"))
                    {
                        var selectedCFLItemCode = selectedCFLItems.GetValue("ItemCode", 0).ToString();
                        var selectedCFLItemName = selectedCFLItems.GetValue("ItemName", 0).ToString();
                        if (!selectedCFLItemCode.Equals(string.Empty))
                        {
                            mtxItems.SetCellWithoutValidation(row, "RecDesc", selectedCFLItemName);
                            mtxItems.FlushToDataSource();
                        }
                    }
                }
                //this.UIAPIRawForm.Select();
                //mtxItems.SetCellFocus(pVal.Row, mtxItems.GetColumnIndex(pVal.ColUID));
                currentControl = mtxItems.GetCellSpecific(colUid, row) as SAPbouiCOM.EditText;
                //currentControl.ActivateControl();
            }
            catch (Exception ex)
            {

            }
        }
コード例 #37
0
        private void LoadGridItensComplementares()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oDataTableItc").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oDataTableItc").ExecuteQuery("select T1.ItemCode, T1.ItemName, T1.OnHand, T0.U_FLX_FB_ITC_QTD, T2.CardCode, T2.CardName, T0.U_FLX_FB_ITC_OBS, T0.Code, T0.U_FLX_FB_ITC_PRZETG, T0.U_FLX_FB_ITC_SOLICI, T0.U_FLX_FB_ITC_RECEB from [@FLX_FB_ITC] T0 inner join OITM T1 on T1.ItemCode = T0.U_FLX_FB_ITC_IDOITM inner join OCRD T2 on T2.CardCode = T0.U_FLX_FB_ITC_IDOCRD where T0.U_FLX_FB_ITC_IDOOPR = '" + OpID + "'");

            oItem = oForm.Items.Item("Det_Cmp");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Mon_Itc");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #38
0
        private void mtxCost_ChooseFromListAfter(object sboObject, SAPbouiCOM.SBOItemEventArg pVal)
        {
            try
            {
                var selectedItems = base.GetCFLSelectedItem(pVal);
                if (pVal.ColUID.Equals("Code"))
                {
                    var selectedValue = selectedItems.GetValue("U_Type", 0).ToString();
                    if (!selectedValue.Equals(string.Empty))
                    {
                        mtxCost.SetCellValue("Type", pVal.Row, selectedValue);
                        mtxCost.FlushToDataSource();
                    }
                }
                //SELECT THE CURRENT CONTROL IN ORDER TO ENABLE ON FORM ACTIVATION
                currentControl = mtxCost.GetCellSpecific(pVal.ColUID, pVal.Row) as SAPbouiCOM.EditText;
            }
            catch (Exception ex)
            {
                Utilities.LogException(ex);
            }

        }
コード例 #39
0
        /// <summary>
        /// Initialize components. Called by framework after form created.
        /// </summary>
        public override void OnInitializeComponent()
        {
            this.mtxItems = ((SAPbouiCOM.Matrix)(this.GetItem("mtxItems").Specific));
            this.txtDocNo = ((SAPbouiCOM.EditText)(this.GetItem("txtDocNo").Specific));
            this.dtTransferItemLines = this.UIAPIRawForm.DataSources.DBDataSources.Item(string.Format("@{0}", TableNames.TransferItemsLines));
            this.dpDocDate = ((SAPbouiCOM.EditText)(this.GetItem("dpDocDate").Specific));
            this.mtxItems.ChooseFromListBefore += new SAPbouiCOM._IMatrixEvents_ChooseFromListBeforeEventHandler(this.mtxItems_ChooseFromListBefore);
            this.mtxItems.ChooseFromListAfter += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxItems_ChooseFromListAfter);
            this.mtxItems.ClickBefore += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxItems_ClickBefore);
            this.btnSave = ((SAPbouiCOM.Button)(this.GetItem("1").Specific));
            this.btnSave.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSave_ClickBefore);
            this.btnSave.PressedBefore += new SAPbouiCOM._IButtonEvents_PressedBeforeEventHandler(this.btnSave_PressedBefore);
            this.btnCancel = ((SAPbouiCOM.Button)(this.GetItem("2").Specific));
            this.fldrItems = ((SAPbouiCOM.Folder)(this.GetItem("Item_5").Specific));
            this.fldrCosts = ((SAPbouiCOM.Folder)(this.GetItem("Item_6").Specific));
            this.mtxCost = ((SAPbouiCOM.Matrix)(this.GetItem("Item_7").Specific));
            this.mtxCost.ChooseFromListAfter += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxCost_ChooseFromListAfter);
            this.mtxCost.ClickBefore += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxCost_ClickBefore);
            //this.btnCalculate = ((SAPbouiCOM.Button)(this.GetItem("btnClc").Specific));
            //this.btnCalculate.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnCalculate_ClickAfter);
            //this.btnCalculate.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnCalculate_ClickBefore);
            this.btnAddRow = ((SAPbouiCOM.Button)(this.GetItem("btnAddRow").Specific));
            this.btnAddRow.ClickBefore += btnAddRow_ClickBefore;
            this.btnAddRow.ClickAfter += btnAddRow_ClickAfter;
            this.mtxItems.ValidateBefore += mtxItems_ValidateBefore;
            this.OnCustomInitialize();

        }
コード例 #40
0
        private void LoadGridConferenciaMedicao()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oDataTable").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oDataTable").ExecuteQuery("select * from [@FLX_FB_CONFMED] where U_FLX_FB_CONFMED_ID = '" + OpID + "' and U_FLX_FB_CONFMED_IDA = '" + iIdAmbienteMedicao.ToString() + "'");

            oItem = oForm.Items.Item("Med_Cnf");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #41
0
        private void LoadGridAvarias()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oDataTableAvr").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oDataTableAvr").ExecuteQuery("select * from [@FLX_FB_AVR] where U_FLX_FB_AVR_IDOOPR = '" + OpID + "' and U_FLX_FB_AVR_IDAMBI = '" + iRowAmbiente.ToString() + "'");

            oItem = oForm.Items.Item("Ava_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #42
0
        private void LoadAmbientesInMatrix()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oMatrixDT").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '" + OpID + "'");
            //oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T2.Name as elbProj, T3.Name as detProj, T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId inner join [@FLX_FB_PRJ] T2 on T2.Code = T0.U_FLX_FB_ELB_PROJETI inner join [@FLX_FB_PRJ] T3 on T3.Code = T0.U_FLX_FB_DET_PROJETI WHERE T0.[OprId] = '" + OpID + "'");

            oItem = oForm.Items.Item("Med_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
            iRowAmbienteMedicao = 1;
            iIdAmbienteMedicao = int.Parse(((SAPbouiCOM.EditText)oMatrix.Columns.Item("Med_Amb_C2").Cells.Item(iRowAmbienteMedicao).Specific).Value);

            oItem = oForm.Items.Item("Res_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Ela_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Ver_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Apr_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Apv_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Ped_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Det_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Fab_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Mon_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();

            oItem = oForm.Items.Item("Etg_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #43
0
        private void LoadGridAnaliseCritica()
        {
            string OpID = null;

            oForm.DataSources.DataTables.Item("oDataTableAnalise").Clear();
            oItem = oForm.Items.Item("74");
            oEditItem = ((SAPbouiCOM.EditText)(oItem.Specific));
            OpID = oEditItem.Value;
            oForm.DataSources.DataTables.Item("oDataTableAnalise").ExecuteQuery("SELECT * FROM [@FLX_FB_ANLCRI] where U_FLX_FB_ANLCRI_ID = '" + OpID + "'" + "and U_FLX_FB_ANLCRI_AMBI = '" + idAmbiente + "'");

            oItem = oForm.Items.Item("Ans_Amb");
            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));
            oMatrix.LoadFromDataSource();
        }
コード例 #44
0
        private void SBO_Application_DataEvent(ref SAPbouiCOM.BusinessObjectInfo pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            if ((pVal.FormTypeEx == "320" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD) & (pVal.BeforeAction == false))
            {
                string idOOPR = ((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value;
                ambiente = new Ambiente(idOOPR);
                projetista = new Projetista(idOOPR);
                projetistas = projetista.getProjetistas();

                if (ambiente.possuiAmbientesCadastrados())
                {
                    //Seta todas a Matrizes para carregar os ambientes cadastrados.
                    LoadAmbientesInMatrix();
                    oMatrix.LoadFromDataSource();
                }

                //Grids com Tabela de Usuário - Inclui o select em um datatable e seta este datatable para a matriz específica.
                idAmbiente = 1000;
                iRowAmbiente = 1000;
                iIdAmbienteMedicao = 1000;
                idAmbientePendencia = 1000;
                LoadGridConferenciaMedicao();
                LoadGridAvarias();
                LoadGridPendencias();
                LoadGridItensComplementares();

                //Limpa a variável que pega o id do ambiente selecionado e carrega a grid de analise critica com parâmetro idAmbiente = 0
                LoadGridAnaliseCritica();

                /**** INÍCIO - CARREGAMENTO DE COMBOS *******/

                loadCombo("Ent_Amb", ambiente.getAmbientes());

                oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific);
                string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value;
                oEditItem.Value = ambiente.getDescricaoEntrevista(selectedValue);

                //Apresentação - Pega o valor cadastrado na drop de projetistas, lista o nome e todos os projetistas.
                loadCombo("Apr_Proj", projetistas);
                //Entrevista - Pega o valor cadastrado na drop de projetistas, lista o nome e todos os projetistas.
                loadCombo("Ent_Proj", projetistas);
                //Medição - Pega o valor cadastrado na drop de projetistas, lista o nome e todos os projetistas.
                loadCombo("Med_Proj", projetistas);

                if (ambiente.possuiAmbientesCadastrados())
                {
                    //Projetistas - Grid Elaboração
                    loadComboEmGrid("Ela_Amb", "Ela_Amb_C2", projetistas);
                    //Projetistas - Grid Detalhamento
                    loadComboEmGrid("Det_Amb", "Det_Amb_C2", projetistas);
                    //Projetistas - Grid Verificação
                    loadComboEmGrid("Ver_Amb", "Ver_Amb_C2", projetistas);
                    //Projetistas - Grid Aprovação
                    loadComboEmGrid("Apv_Amb", "Apv_Amb_C1", projetistas);
                    //Projetistas - Grid Pedido
                    loadComboEmGrid("Ped_Amb", "Ped_Amb_C5", projetistas);
                    //Projetistas - Grid Fabrica
                    loadComboEmGrid("Fab_Amb", "Fab_Amb_C3", projetistas);
                    //Projetistas - Grid Montagem
                    loadComboEmGrid("Mon_Amb", "Mon_Amb_C1", projetistas);
                    //Projetistas - Grid Entrega
                    loadComboEmGrid("Etg_Amb", "Etg_Amb_C2", projetistas);
                }
                /**** FIM - CARREGAMENTO DE COMBOS *******/

                oNewItem = oForm.Items.Item("Apr_Proj");
                oComboItenPrjApr = ((SAPbouiCOM.ComboBox)(oNewItem.Specific));

                //Entrevista - Pega o valor cadastrado na drop de projetistas, lista o nome e todos os projetistas.
                oNewItem = oForm.Items.Item("Ent_Proj");
                oComboItenPrjEntrevista = ((SAPbouiCOM.ComboBox)(oNewItem.Specific));

                //Medição - Pega o valor cadastrado na drop de projetistas, lista o nome e todos os projetistas.
                oNewItem = oForm.Items.Item("Med_Proj");
                oComboItenPrjMed = ((SAPbouiCOM.ComboBox)(oNewItem.Specific));

                //LoadComboProjetistaCadastradoElaboracao(idOOPR);
                LoadComboProjetistaCadastradoOOPR(oComboItenPrjEntrevista, oComboItenPrjMed, oComboItenPrjApr, idOOPR);

                ContarLinhasIniciaisMatrix();
                resumo.disableCampos();
                PreencherCamposResumo(idOOPR);
            }

            if (pVal.FormTypeEx == "651" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD & !pVal.BeforeAction)
            {
                if (oFormAtual.Items.Item("67").Specific.Value == "M")
                {
                    atividade.habilitaBotaoAta();
                }
                else
                {
                    atividade.desabilitaBotaoAta();
                }
            }
        }