Beispiel #1
0
        public void ListLaptops()
        {
            List <Laptop> laptops = null;
            IRepositorio  rep     = new RepositorioMySQL();

            try
            {
                laptops = rep.List();
            }
            catch (Exception ex)
            {
            }
            Assert.IsNotNull(laptops);
        }
Beispiel #2
0
        private void ListLaptops()
        {
            IRepositorio rep = new RepositorioMySQL();

            try
            {
                gridLaptops.DataSource = null;
                gridLaptops.DataSource = rep.List();
                gridLaptops.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Ocorreu um erro: {ex.Message}");
            }
        }