Exemplo n.º 1
0
 internal void SalvarPaciente(PacienteDominio paciente)
 {
     using (var conexao = new SqlConnection(_connectionString))
     {
         conexao.Execute("Insert into TBPacientes values(@nome, @telefone)", paciente);
     }
 }
Exemplo n.º 2
0
        private void IncluirPacienteButton_Click(object sender, EventArgs e)
        {
            var paciente = new PacienteDominio()
            {
                Nome     = nomeTextBox.Text,
                Telefone = telefoneTextBox.Text
            };

            PacienteGerenciador.SalvarPaciente(paciente);
            if (true)
            {
                MessageBox.Show("Paciente inserido com sucesso");
                LimpaController();
            }
        }
Exemplo n.º 3
0
 internal static void SalvarPaciente(PacienteDominio paciente)
 {
     PacienteRepositorio.Instance.SalvarPaciente(paciente);
 }