Exemplo n.º 1
0
        private void txbConsultarPaciente_TextChanged(object sender, EventArgs e)
        {
            if (txbConsultarPaciente.Text.Equals(""))
            {
                controlePaciente controlePaciente = new controlePaciente();

                dgv_Pacientes.DataSource = controlePaciente.ListarPaciente();
            }
            else
            {
                Paciente paciente = new Paciente();
                Pesquisar(paciente);
            }
        }
Exemplo n.º 2
0
        private void BtnExcluirPaciente_Click(object sender, EventArgs e)
        {
            String Excluir_Id;

            DialogResult confirm = MessageBox.Show("Deseja Realmente Excluir o Paciente?", "Exclusão de Paciente", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);

            if (confirm.ToString().ToUpper() == "YES")
            {
                controlePaciente controlePaciente = new modelo.controle.controlePaciente();

                Excluir_Id = dgv_Pacientes.SelectedCells[0].Value.ToString();
                controlePaciente.ExcluirPaciente(Excluir_Id);

                MessageBox.Show(controlePaciente.mensagem);

                controlePaciente = new controlePaciente();

                dgv_Pacientes.DataSource = controlePaciente.ListarPaciente();
            }
        }
Exemplo n.º 3
0
        private void GrpConsultaPaciente_Enter(object sender, EventArgs e)
        {
            controlePaciente controlePaciente = new controlePaciente();

            dgv_Pacientes.DataSource = controlePaciente.ListarPaciente();
        }
Exemplo n.º 4
0
        private void btnAtualizar_Click(object sender, EventArgs e)
        {
            controlePaciente controlePaciente = new controlePaciente();

            dgv_Pacientes.DataSource = controlePaciente.ListarPaciente();
        }