Beispiel #1
0
 private void btnGuardarPi_Click(object sender, EventArgs e)
 {
     if (ValiPilo())
     {
         Piloto p1 = new Piloto();
         p1.Nombre           = txtNombre.Text;
         p1.Apellido_Materno = txtApellidoMa.Text;
         p1.Apellido_Paterno = txtApellidoPa.Text;
         p1.Fecha_Nacimiento = txtFechaNacimiento.Value;
         p1.Curp             = txtCurp.Text;
         p1.Rfc             = txtRfc.Text;
         p1.Tiempo_De_Vuelo = double.Parse(txtTiempoVueloPi.Text);
         p1.Tipo_De_Nave    = txtTipoNavePi.Text;
         if (pilo != null)
         {
             p1.Id = pilo.Id;
             LPiloto.ModificarPiloto(p1);
         }
         else
         {
             LPiloto.AgregarPiloto(p1);
         }
         this.Close();
     }
 }