コード例 #1
0
        private void Turnos()
        {
            TimeSpan inicio;
            TimeSpan fin;

            if (DiaDeLaSemana() == 6)
            {
                inicio = new TimeSpan(10, 0, 0);
                fin    = new TimeSpan(15, 0, 0);
            }
            else
            {
                inicio = new TimeSpan(7, 0, 0);
                fin    = new TimeSpan(20, 0, 0);
            }

            _Turnos = RangoHorario.Rango(inicio, fin);
            RefrescarDGV(_Turnos);
        }
コード例 #2
0
 private void InicializarComboboxes()
 {
     ComboboxesSemana().ForEach(comboBox => comboBox.DataSource = RangoHorario.Rango(new TimeSpan(7, 0, 0), new TimeSpan(20, 0, 0)));
     ComboboxesSabado().ForEach(comboBox => comboBox.DataSource = RangoHorario.Rango(new TimeSpan(10, 0, 0), new TimeSpan(15, 0, 0)));
     Comboboxes().ForEach(comboBox => comboBox.Enabled          = false);
 }