Esempio n. 1
0
 private void setHorarioAlForm(Entrenamiento entrenamiento)
 {
     foreach (Turno x in ge.listaTurnoSegunIdEntrenamiento(entrenamiento.Id))
     {
         if (x.IdDia == 1)
         {
             lblLunes.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 2)
         {
             lblMartes.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 3)
         {
             lblMiercoles.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 4)
         {
             lblJueves.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 5)
         {
             lblViernes.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 6)
         {
             lblSabado.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
         if (x.IdDia == 7)
         {
             lblDomingo.Text = " de " + x.HoraEntrada.TimeOfDay.ToString() + " hs. a " + x.HoraSalida.TimeOfDay.ToString() + " hs.";
         }
     }
 }
Esempio n. 2
0
        private void cmbEntrenamiento_SelectionChangeCommitted(object sender, EventArgs e)
        {
            Entrenamiento entrenamiento = (Entrenamiento)cmbEntrenamiento.SelectedItem;

            lblDeporteSeleccionado.Text = entrenamiento.Deporte.ToString();
            lstProfesores.DataSource    = gp.listaProfesorSegunIdDeporte(entrenamiento.Deporte.Id);
            txtPredio.Text = entrenamiento.Predio.ToString();

            foreach (Turno t in ge.listaTurnoSegunIdEntrenamiento(entrenamiento.Id))
            {
                if (t.IdDia == 1)
                {
                    lblLunes.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 2)
                {
                    lblMartes.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 3)
                {
                    lblMiercoles.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 4)
                {
                    lblJueves.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 5)
                {
                    lblViernes.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 6)
                {
                    lblSabado.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
                if (t.IdDia == 7)
                {
                    lblDomingo.Text = " de " + t.HoraEntrada.TimeOfDay.ToString() + " hs. a " + t.HoraSalida.TimeOfDay.ToString() + " hs.";
                }
            }

            lblPrecioMensualSeleccionado.Text = entrenamiento.PrecioMensual.ToString();
            lblPrecioMatSeleccionado.Text     = entrenamiento.PrecioMatricula.ToString();
            lblCantidadCuotas.Text            = entrenamiento.CantidadCuotas.ToString();
        }
Esempio n. 3
0
        private void setHorarioAlForm(Entrenamiento entrenamiento)
        {
            foreach (Turno x in ge.listaTurnoSegunIdEntrenamiento(entrenamiento.Id))
            {
                if (x.IdDia == 1)
                {
                    chkLunes.Checked          = true;
                    dtpHoraEntradaLunes.Value = x.HoraEntrada;
                    dtpHoraSalidaLunes.Value  = x.HoraSalida;
                }
                if (x.IdDia == 2)
                {
                    chkMartes.Checked          = true;
                    dtpHoraEntradaMartes.Value = x.HoraEntrada;
                    dtpHoraSalidaMartes.Value  = x.HoraSalida;
                }
                if (x.IdDia == 3)
                {
                    chkMiercoles.Checked          = true;
                    dtpHoraEntradaMiercoles.Value = x.HoraEntrada;
                    dtpHoraSalidaMiercoles.Value  = x.HoraSalida;
                }
                if (x.IdDia == 4)
                {
                    chkJueves.Checked          = true;
                    dtpHoraEntradaJueves.Value = x.HoraEntrada;
                    dtpHoraSalidaJueves.Value  = x.HoraSalida;
                }
                if (x.IdDia == 5)
                {
                    chkViernes.Checked          = true;
                    dtpHoraEntradaViernes.Value = x.HoraEntrada;
                    dtpHoraSalidaViernes.Value  = x.HoraSalida;
                }
                if (x.IdDia == 6)
                {
                    chkSabado.Checked          = true;
                    dtpHoraEntradaSabado.Value = x.HoraEntrada;
                    dtpHoraSalidaSabado.Value  = x.HoraSalida;
                }
                if (x.IdDia == 7)
                {
                    chkDomingo.Checked          = true;
                    dtpHoraEntradaDomingo.Value = x.HoraEntrada;
                    dtpHoraSalidaDomingo.Value  = x.HoraSalida;
                }

                if (chkLunes.Checked)
                {
                    lblLunes.Text = " de " + dtpHoraEntradaLunes.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaLunes.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkMartes.Checked)
                {
                    lblMartes.Text = " de " + dtpHoraEntradaMartes.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaMartes.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkMiercoles.Checked)
                {
                    lblMiercoles.Text = " de " + dtpHoraEntradaMiercoles.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaMiercoles.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkJueves.Checked)
                {
                    lblJueves.Text = " de " + dtpHoraEntradaJueves.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaJueves.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkViernes.Checked)
                {
                    lblViernes.Text = " de " + dtpHoraEntradaViernes.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaViernes.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkSabado.Checked)
                {
                    lblSabado.Text = " de " + dtpHoraEntradaSabado.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaSabado.Value.TimeOfDay.ToString() + " hs.";
                }
                if (chkDomingo.Checked)
                {
                    lblDomingo.Text = " de " + dtpHoraEntradaDomingo.Value.TimeOfDay.ToString() + " hs. a " + dtpHoraSalidaDomingo.Value.TimeOfDay.ToString() + " hs.";
                }
            }
        }