private void AddItemsToOwnerCbo() { cboOwner.Items.Clear(); cboOwner.Items.Add(new Utilities.ListItem("", "")); foreach (User user in User.ActiveUsers()) { string label; if (String.IsNullOrWhiteSpace(user.FullName)) { label = user.DomainName; } else { label = user.FullName; } Utilities.ListItem _listItem = new Utilities.ListItem(label, user); cboOwner.Items.Add(_listItem); } if (cboOwner.Items.Count > 0) { cboOwner.SelectedIndex = 0; } }
private void AddItemsToSelectedQuarterCbo() { cboSelectedQuarter.Items.Clear(); cboSelectedQuarter.Items.Add(new Utilities.ListItem("", "")); foreach (Business.Entities.TimeTable timeTable in Business.Entities.TimeTable.PastFourtyQuarters()) { Utilities.ListItem _listItem = new Utilities.ListItem(timeTable.YearValue + " - Q" + timeTable.QuarterValue, timeTable); cboSelectedQuarter.Items.Add(_listItem); } if (cboSelectedQuarter.Items.Count > 0) { cboSelectedQuarter.SelectedIndex = 0; } }