protected void btnModificar_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
                };


                usu.ActualizarPaciente(paciente);
                buscar.Visible           = true;
                divMantenimiento.Visible = false;
                MostrarMensaje("Paciente modificado con éxito");
                ttIdPaciente.Text = String.Empty;
                gridview.Visible  = true;
            }
            catch (Exception)
            {
                MostrarMensajeError("Ha ocurrido un error, intente mas tarde");
            }
        }
示例#2
0
 public void ActualizarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente)
 {
     _db.Update(paciente);
 }
示例#3
0
 public void InsertarPaciente(DATOS_ClinicaDental.Modelos.Paciente paciente)
 {
     _db.Insert(paciente);
 }