コード例 #1
0
        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());
            }
        }
コード例 #2
0
 public void ActualizarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente)
 {
     usu.ActualizarPaciente(paciente);
 }
コード例 #3
0
 public void InsertarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente)
 {
     usu.InsertarPaciente(paciente);
 }