private void AvailableDays() { DiasActivos = DaysDao.getActiveDaysForReport(); foreach (DAYS dia in DiasActivos) { ddlDay.Items.Add(new ListItem("Day " + dia.Day.ToString(), dia.idDay.ToString())); } ddlDay.SelectedIndex = 0; }
private void LoadAvailableDaysToReport() { List <DAYS> activedDays = DaysDao.getActiveDaysForReport(); if (activedDays != null) { int cont = 0; foreach (DAYS activeDay in activedDays) { DateTime configuredDate = (DateTime)activeDay.completeDay; ddlDay.Items.Insert(cont, new ListItem("Day " + activeDay.Day.ToString() + " " + CreateDateSuffix(configuredDate) + " of " + configuredDate.ToString("MMMM", new CultureInfo("en-US")), activeDay.idDay.ToString())); cont++; } } }