public void cmdOk_Click(ItemEvent pEvent, bool bubleevent)
        {
            try
            {
                var grdCompany = GetItem(UniqueID.itmCompany).Specific
                                 as SAPbouiCOM.Grid;

                if (grdCompany.Rows.Count == 0)
                {
                    throw new Exception("Selecione uma empresa");
                }

                var rowSel = grdCompany.Rows.SelectedRows.Item(
                    0, SAPbouiCOM.BoOrderType.ot_RowOrder);

                var entitiID = grdCompany.DataTable.GetValue("Codigo", rowSel).To <Int32>();
                var spID     = grdCompany.DataTable.GetValue("ConnID", rowSel).To <Int32>();

                //EntitySelection.Instace.SetCompany( entitiID, spID );

                FormBind.Close();
            }
            catch (Exception ex)
            {
                SboApp.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, true);
            }
        }
Beispiel #2
0
 internal void Select()
 {
     FormBind.Select();
 }
 public void cmdCancel_Click(ItemEvent pEvent, bool bubleevent)
 {
     FormBind.Close();
 }