public MainWindow() { InitializeComponent(); AllStates.Add(new State { Index = 1 }); AllStates.Add(new State { Index = 2 }); AllStates.Add(new State { Index = 3 }); AllStates.Add(new State { Index = 4 }); }
public void SetListItems(Manager manager) { var allStates = manager.GetAllStates(); foreach (var state in allStates) { AllStates.Add(new SelectListItem { Text = state.StateAbbreviation, Value = state.Id.ToString() }); } var purchaseTypes = manager.GetAllPurchaseTypes(); foreach (var type in purchaseTypes) { AllPurchaseTypes.Add(new SelectListItem { Text = type.Name, Value = type.Id.ToString() }); } }