public PageCheckOut() { this.InitializeComponent(); //date fromDatePicker.Date = DateTime.Today.AddDays(-3).Date; toDatePicker.Date = DateTime.Today.Date; var _enumval = Enum.GetValues(typeof(PurchaseStatus)).Cast <PurchaseStatus>(); purchaseStatesComboBox.ItemsSource = _enumval.ToList(); purchaseStatesComboBox.SelectedIndex = 4; reLoadData(); productsListView.ItemsSource = QueryForSQLServer.GetProductFromDb(); }