public void InicializarCombos()
        {
            List <Paciente> lista    = new List <Paciente>();
            List <Medico>   listamed = new List <Medico>();
            List <Situacao> situacao = new List <Situacao>();
            List <Convenio> convenio = new List <Convenio>();
            List <Exame>    exame    = new List <Exame>();

            lista = MySqlPacienteRepository.GetAll().ToList();
            CbbPaciente.DataSource    = lista;
            CbbPaciente.DisplayMember = "nome";
            CbbPaciente.ValueMember   = "id";

            listamed                = MySqlMedicoRepository.GetAll().ToList();
            CbbMedico.DataSource    = listamed;
            CbbMedico.DisplayMember = "nome";
            CbbMedico.ValueMember   = "id";

            situacao = MySqlPacienteRepository.GetSituacoes().ToList();
            CbbSituacao.DataSource    = situacao;
            CbbSituacao.DisplayMember = "descricao";
            CbbSituacao.ValueMember   = "id";

            convenio = MySqlConvenioRepository.GetAll().ToList();
            CbbConvenio.DataSource    = convenio;
            CbbConvenio.DisplayMember = "nome";
            CbbConvenio.ValueMember   = "id";

            exame = MySqlExameRepository.GetAll().ToList();
            CbbExame.DataSource    = exame;
            CbbExame.DisplayMember = "descricao";
            CbbExame.ValueMember   = "id";
        }
Пример #2
0
        public void InicializarCombos()
        {
            List <Medico> listamed = new List <Medico>();

            listamed                = MySqlMedicoRepository.GetAll().ToList();
            CbbMedico.DataSource    = listamed;
            CbbMedico.DisplayMember = "nome";
            CbbMedico.ValueMember   = "id";
        }