コード例 #1
0
        private void btn_Update_Click(object sender, EventArgs e)
        {
            using (ServiceReference1.IfuncionesClient cliente = new ServiceReference1.IfuncionesClient())
            {
                try
                {
                    {
                        if (cliente.modificar(Int32.Parse(textBox1.Text), textBox2.Text, Int32.Parse(textBox3.Text), float.Parse(textBox4.Text), textBox5.Text))
                        {
                            MessageBox.Show("Elemento modificado");
                        }

                        else
                        {
                            MessageBox.Show("No se pudo modificar");
                        }
                    }
                    textBox1.Text = "";
                    textBox2.Text = "";
                    textBox3.Text = "";
                    textBox4.Text = "";
                    textBox5.Text = "";
                }
                catch
                {
                    MessageBox.Show("Seleccione los datos a modificar");
                }
            }
        }