Exemple #1
0
        public MainView()
        {
            NavigationCacheMode = NavigationCacheMode.Required;
            var locator = App.Current.Resources["Locator"] as ViewModels.ViewModelLocator;

            MainVM = locator.MainVM;
            this.InitializeComponent();
            this.Loaded += MainView_Loaded;
        }
Exemple #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // use the table name of the current data set to figure out what we need to refresh
            ViewModels.QueryDisplayVM qvm    = ViewModels.QueryDisplayVM.Instance;
            ViewModels.MainVM         mainvm = ViewModels.MainVM.Instance;
            string t = qvm.QueryDisplayItemsSource.Table.TableName;

            switch (t)
            {
            case "Employees":
                mainvm.EmployeesCommand.Execute();
                break;

            case "EmployeeSched":
                mainvm.EmployeeSchedCommand.Execute();
                break;

            case "Bags":
                mainvm.BagsCommand.Execute();
                break;

            case "BagClaims":
                mainvm.BagClaimsCommand.Execute();
                break;

            case "Equipment":
                mainvm.EquipmentCommand.Execute();
                break;

            case "WorkOrders":
                mainvm.WorkOrdersCommand.Execute();
                break;

            case "Flights":
                mainvm.FlightsCommand.Execute();
                break;

            case "FuelOrders":
                mainvm.FuelOrdersCommand.Execute();
                break;

            case "LargeFuelOrders":
                qvm.LargeFuelOrders();
                break;

            case "JuneEmployees":
                qvm.JuneEmployees();
                break;

            case "BagsInTransit":
                qvm.BagsInTransit();
                break;

            case "UnoperationalEqp":
                qvm.UnoperationalEqp();
                break;

            default:
                break;
            }
        }