private void averageButton_Click(object sender, RoutedEventArgs e) { var nhi = new NHibernateInventory(); List<string> fields = new List<string> { "Guitar Type","Total Value" }; IList guitarInventory = nhi.ExecuteNamedQuery("GuitarAVGValueByTypeHQL"); inventoryDataGrid.ItemsSource = this.BuildDataTable(fields, guitarInventory).DefaultView; SetDatabaseRoundTripImage(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //test NHibernateInventory nHibernateInventory = new NHibernateInventory(); var resultSet = nHibernateInventory.ExecuteNamedQuery("GuitarValueByTypeHQL"); // populate the combo box with the guitars/inventory type. PopulateComboBox(); // load the Inventory with all guitar types. LoadInventoryGrid(); this.SetDatabaseRoundTripImage(); }