Beispiel #1
0
        private void AtualizarTabela()
        {
            RemedioRepositorio repositorio = new RemedioRepositorio();
            List <Remedio>     remedios    = repositorio.ObterTodos();

            dataGridView1.Rows.Clear();

            for (int i = 0; i < remedios.Count; i++)
            {
                Remedio remedio = remedios[i];
                dataGridView1.Rows.Add(new object[] { remedio.Id, remedio.Nome, remedio.Faixa, remedio.Categoria, remedio.Receita });
            }
        }
Beispiel #2
0
        public void AtualixzarTabela()
        {
            RemedioRepositorio repositorio = new RemedioRepositorio();

            List <Remedio> remedios = repositorio.ObterTodos();

            dataGridView1.Rows.Clear();
            for (int i = 0; i < remedios.Count; i++)
            {
                Remedio remedio = remedios[i];
                dataGridView1.Rows.Add(
                    new object[]
                {
                    remedio.Id, remedio.Generico, remedio.Nome, remedio.Categoria, remedio.Solido, remedio.ContraIndicacoes, remedio.Bula, remedio.Faixa, remedio.PrecisaReceita
                }
                    );
            }
        }
Beispiel #3
0
        private void AtualizarTabela()
        {
            RemedioRepositorio repositorio = new RemedioRepositorio();
            List <Remedio>     remedios    = repositorio.ObterTodos();

            dataGridView1.Rows.Clear();
            for (int i = 0; i < remedios.Count; i++)
            {
                Remedio remedio       = remedios[i];
                string  genericoTexto = "";
                if (remedio.Generico == true)
                {
                    genericoTexto = "Sim";
                }
                else
                {
                    genericoTexto = "Não";
                }
                dataGridView1.Rows.Add(new object[]
                {
                    remedio.Id, remedio.Nome, remedio.Categoria, remedio.Faixa, genericoTexto
                });
            }
        }