Ejemplo n.º 1
0
        // GET LIST OF BANCOS
        //------------------------------------------------------------------------------------------------------------
        private void GetBancosList()
        {
            try
            {
                // --- Ampulheta ON
                Cursor.Current = Cursors.WaitCursor;

                var bancoBLL = new BancoBLL();
                listBancos = bancoBLL.GetListBanco();
            }
            catch (Exception ex)
            {
                AbrirDialog("Uma exceção ocorreu ao obter a lista de bancos..." + "\n" +
                            ex.Message, "Exceção", DialogType.OK, DialogIcon.Exclamation);
            }
            finally
            {
                // --- Ampulheta OFF
                Cursor.Current = Cursors.Default;
            }
        }
 // GET DATA
 //------------------------------------------------------------------------------------------------------------
 private void ObterDados(object sender, EventArgs e)
 {
     try
     {
         // --- Ampulheta ON
         Cursor.Current = Cursors.WaitCursor;
         BancoBLL cBLL = new BancoBLL();
         listBanco = cBLL.GetListBanco("", true);
         PreencheListagem();
     }
     catch (Exception ex)
     {
         AbrirDialog("Uma exceção ocorreu ao Obter os Dados da listagem..." + "\n" +
                     ex.Message, "Exceção", DialogType.OK, DialogIcon.Exclamation);
     }
     finally
     {
         // --- Ampulheta OFF
         Cursor.Current = Cursors.Default;
     }
 }
 // GET DATA
 //------------------------------------------------------------------------------------------------------------
 private void ObterDados()
 {
     try
     {
         // --- Ampulheta ON
         Cursor.Current         = Cursors.WaitCursor;
         list                   = classBanco.convertFrom(bBLL.GetListBanco());
         bindList.DataSource    = list;
         dgvListagem.DataSource = bindList;
     }
     catch (Exception ex)
     {
         AbrirDialog("Uma exceção ocorreu ao Obter os Dados da listagem..." + "\n" +
                     ex.Message, "Exceção", DialogType.OK, DialogIcon.Exclamation);
     }
     finally
     {
         // --- Ampulheta OFF
         Cursor.Current = Cursors.Default;
     }
 }