public Uploader() { InitializeComponent(); DisableEnableWindows(ActiveWindow.Home); /*DateTime date = new DateTime(2016, 06, 6); * for (int i = 1; i <= 52; i++) * { * cboColsonidatedReportDate.Items.Add(date.ToString("yyyy-MM-dd")); * date = date.AddDays(7); * }*/ List <User> userList = DownloadData.GetAllUsers(); List <DateTime> dateList = new List <DateTime>(); foreach (User u in userList) { List <tmpdate> tmp; tmp = DownloadData.GetWeeklyDataDates(u.id); try { tmp = DownloadData.GetWeeklyDataDates(u.id); } catch { continue; } if (tmp == null) { continue; } foreach (tmpdate dt in tmp) { //MessageBox.Show(dt + ""); if (dateList.Contains(dt.sdate)) { continue; } else { dateList.Add(dt.sdate); cboColsonidatedReportDate.Items.Add(dt.sdate.ToString("yyyy-MM-dd")); } } } txtbxSaveDir.Text = Utilities.SAVE_FOLDER; }