Exemple #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     //actualizar // UPDATE
     using (ServiceReference1.Service1Client servicio = new ServiceReference1.Service1Client())
     {
         ServiceReference1.AlumnosInfo info = new ServiceReference1.AlumnosInfo();
         info.IDAlumno  = Convert.ToInt32(cbAlumno.SelectedValue);
         info.Nombre    = textBox2.Text;
         info.ApPaterno = textBox3.Text;
         info.ApMaterno = textBox4.Text;
     }
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {//AGREGAR A LA BASE DE DATOS
            using (ServiceReference1.Service1Client servicio = new ServiceReference1.Service1Client())
            {
                ServiceReference1.AlumnosInfo info = new ServiceReference1.AlumnosInfo();
                info.Nombre    = textBox2.Text;
                info.ApPaterno = textBox3.Text;
                info.ApMaterno = textBox4.Text;

                if (servicio.CreateAlumno(info) != 0)
                {
                    MessageBox.Show("EXITO!!!");
                }
                else
                {
                    MessageBox.Show("ERROR", "!!!");
                }
            }
        }