Exemple #1
0
        private void LoadSettings()
        {
            Windows.UI.Popups.MessageDialog md = new Windows.UI.Popups.MessageDialog("Could not load settings");

            string          connStr = "Server=den1.mysql3.gear.host;Database=plutos;Uid=plutos;Pwd=Ez7L!3P93e_S;SslMode=None";
            MySqlConnection conn    = new MySqlConnection(connStr);

            conn.Open();
            List <string> accountNames = AccountVM.GetNames(conn);

            CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                    () =>
            {
                if (accountNames != null)
                {
                    Income_Account_ComboBox.ItemsSource = accountNames;
                }
                List <string> customerNames = Customer.GetNames(conn);
                if (customerNames != null)
                {
                    customerBox.ItemsSource = customerNames;
                }
                conn.Close();
                incomeTypeCB.ItemsSource = new List <string> {
                    "Sale", "Invoice", "Subscription"
                };
            });
        }