Example #1
0
        private void btnAgregarParticipante_Click(object sender, EventArgs e)
        {
            ServiceLOCTP.WebServiceLOCTPSoapClient auxServiceTP = new ServiceLOCTP.WebServiceLOCTPSoapClient();
            ServiceLOCTP.Participante auxParticipante           = new ServiceLOCTP.Participante();
            ServiceLOCTP.Torneo       auxTorneo = new ServiceLOCTP.Torneo();

            if (txtIdParticipante.Text != String.Empty)
            {
                if (txtIdTorneo.Text != String.Empty)
                {
                    try
                    {
                        auxParticipante.Id_Participante1 = Convert.ToInt64(txtIdParticipante.Text);
                        auxTorneo.Id_Torneo1             = Convert.ToInt64(txtIdTorneo.Text);
                        auxServiceTP.agregarParticipanteTorneoService(auxParticipante, auxTorneo);


                        MessageBox.Show(" Se ha guardado correctamente");
                    }
                    catch
                    {
                        MessageBox.Show("No se ha guardado");
                    }
                }
                else
                {
                    MessageBox.Show("Porfavor seleccione un Torneo ", "No se ha guardado");
                }
            }
            else
            {
                MessageBox.Show("Porfavor seleccione un Participante ", "No se ha guardado");
            }
        }
Example #2
0
        private void dataGridTorneo_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            ServiceLOCTP.WebServiceLOCTPSoapClient auxServicePrticipanteTorneo = new ServiceLOCTP.WebServiceLOCTPSoapClient();
            ServiceLOCTP.Participante auxParticipante = new ServiceLOCTP.Participante();
            ServiceLOCTP.Torneo       auxTorneo       = new ServiceLOCTP.Torneo();

            int id;


            id = Convert.ToInt32(dataGridTorneo.CurrentRow.Cells[0].Value);
            txtIdTorneo.Text = Convert.ToString(id);
        }
Example #3
0
        private void dataGridParticipante_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            ServiceLOCTP.WebServiceLOCTPSoapClient auxServiceTP = new ServiceLOCTP.WebServiceLOCTPSoapClient();
            ServiceLOCTP.Participante auxParticipante           = new ServiceLOCTP.Participante();
            ServiceLOCTP.Torneo       auxTorneo = new ServiceLOCTP.Torneo();

            int id;

            if (Convert.ToString(dataGridParticipante.CurrentCell.Value) != String.Empty)
            {
                id = Convert.ToInt32(dataGridParticipante.CurrentRow.Cells[0].Value);
                txtIdParticipante.Text = Convert.ToString(id);
            }
            else
            {
                MessageBox.Show("Porfavor Seleccione una celda con valores", "No se ha podido seleccionar");
            }
        }