protected void btnInsertarPaciente_Click(object sender, EventArgs e) { try { int tipo; if (DDLTipoOntograma.SelectedIndex == 0) { tipo = 0; } else { tipo = 1; } IPaciente ipaciente = new MPaciente(); DATOS_ClinicaDental.Modelos.Paciente paciente = new DATOS_ClinicaDental.Modelos.Paciente { IdPaciente = Convert.ToInt32(txtIdPaciente.Text), Nombre = txtNombre.Text, Apellido1 = txtApellido1.Text, Apellido2 = txtApellido2.Text, Telefono = txtTelefono.Text, Correo = txtCorreo.Text, FechaNacimiento = Convert.ToDateTime(txtFecha.Text), IdTipoOntograma = tipo }; ipaciente.InsertarPaciente(paciente); MostrarMensaje("Paciente insertado correctamente!"); Limpiar(); } catch (Exception ee) { MostrarMensajeError(ee.ToString()); } }
public void ActualizarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente) { usu.ActualizarPaciente(paciente); }
public void InsertarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente) { usu.InsertarPaciente(paciente); }