public void modificar()
        {
            String documentoBuscar = txtDocumentoBuscar.Text;

            String documento;
            String nombre;
            String correo;
            String telefono;
            String genero;

            servicio    = ServicioLocalPaciente.getServicio();
            p           = new ServidorPacienteSW.paciente();
            documento   = txtDocumento.Text;
            nombre      = txtNombre.Text;
            correo      = txtCorreo.Text;
            telefono    = txtTelefono.Text;
            genero      = txtGenero.Text;
            p.documento = documento;
            p.nombre    = nombre;
            p.correo    = correo;
            p.telefono  = telefono;
            p.genero    = genero;
            int modificado;

            modificado = servicio.modificarPaciente(p, documentoBuscar);
            if (modificado == 1)
            {
                MessageBox.Show("Paciente modificado con exito");
            }
            else
            {
                MessageBox.Show("Error,Paciente no modificado");
            }
        }
 public static void setServicio(ServidorPacienteSW.PacienteSWClient pServicio)
 {
     if (servicio == null)
     {
         servicio = pServicio;
     }
 }
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            String documentoBuscar = txtDocumentoBuscar.Text;

            servicio = ServicioLocalPaciente.getServicio();
            try
            {
                servicio.eliminarPaciente(documentoBuscar);
                MessageBox.Show("Paciente Eliminado Con exito");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Eror!, No se pudo Eliminar El Paciente");
            }
            limpiar();
        }
        public void buscar()
        {
            String documentoBuscar = txtDocumentoBuscar.Text;

            servicio = ServicioLocalPaciente.getServicio();
            p        = new ServidorPacienteSW.paciente();
            try
            {
                p = servicio.buscarPaciente(documentoBuscar);
                txtDocumento.Text = p.documento;
                txtNombre.Text    = p.nombre;
                txtCorreo.Text    = p.correo;
                txtTelefono.Text  = p.telefono;
                txtGenero.Text    = p.genero;
                MessageBox.Show("Paciente buscado");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error!, El Paciente buscado no existe");
            }
        }