Ejemplo n.º 1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            ServiceFootballer.ServicesClient soap = new ServiceFootballer.ServicesClient();

            String id;
            String name;
            String forename;
            String position;
            String club;
            int    number;
            double height;

            id       = txtId.Text;
            name     = txtNombre.Text;
            forename = txtApellido.Text;
            position = txtPosicion.Text;
            club     = txtClub.Text;
            number   = Convert.ToInt32(txtNumero.Text);
            height   = Convert.ToDouble(txtEstatura.Text);

            ClienteSoap.ServiceFootballer.footballer footballer = new ClienteSoap.ServiceFootballer.footballer();
            footballer.surname  = name;
            footballer.id       = id;
            footballer.forename = forename;
            footballer.position = position;
            footballer.number   = number;
            footballer.height   = height;
            footballer.club     = club;

            soap.update(footballer);
        }
Ejemplo n.º 2
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            ServiceFootballer.ServicesClient soap = new ServiceFootballer.ServicesClient();


            String id;

            id = txtId.Text;
            soap.delete(id);
        }
Ejemplo n.º 3
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            ServiceFootballer.ServicesClient soap = new ServiceFootballer.ServicesClient();
            String id;

            id = txtId.Text;
            ClienteSoap.ServiceFootballer.footballer f = soap.read(id);
            txtApellido.Text = f.surname;
            txtClub.Text     = f.club;
            txtEstatura.Text = f.height.ToString();
            txtNombre.Text   = f.forename;
            txtNumero.Text   = f.number.ToString();
            txtPosicion.Text = f.position;
        }
Ejemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     ServiceFootballer.ServicesClient           soap = new ServiceFootballer.ServicesClient();
     ClienteSoap.ServiceFootballer.footballer[] list;
     try {
         list = soap.list();
         foreach (ClienteSoap.ServiceFootballer.footballer f in list)
         {
             dataGridView1.Rows.Add(f.id, f.forename, f.surname, f.position, f.club, f.number, f.height);
         }
     } catch (Exception ex) {
         MessageBox.Show("Error " + ex.Message);
     }
 }