Exemplo n.º 1
0
        private void Rad_Demo_Click(object sender, RoutedEventArgs e)
        {
            Type = "Demo"; //Set the string "Type" variable Text to "Demo"//

            Rad_New.Foreground  = new SolidColorBrush(Colors.Black);
            Rad_Used.Foreground = new SolidColorBrush(Colors.Black);
            Rad_Demo.Foreground = new SolidColorBrush(Colors.Red);

            connect = new CTUConnection();
            connect.SelectDemoDrive();
            cmbx_Vehicle.ItemsSource       = connect.table2.DefaultView;
            cmbx_Vehicle.DisplayMemberPath = "[Name of vehicle]";
            cmbx_Vehicle.SelectedValuePath = "ID";
        }
        private void Rad_Demo_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            Type = "Demo";                                //Set the string "Type" variable Text to "Demo"//
            GRP_Vehicle.Header = "Select a demo vehicle"; //Set the header of the group-box "GRP_Vehicle" to 'Select a demo vehicle'//

            Rad_New.Foreground  = new SolidColorBrush(Colors.Black);
            Rad_Used.Foreground = new SolidColorBrush(Colors.Black);
            Rad_Demo.Foreground = new SolidColorBrush(Colors.Red);

            connect = new CTUConnection();
            connect.SelectTestDrive2();
            for (int i = 0; i <= connect.table.Rows.Count; i++)
            {
                this.BookCount = i + 1;
            }

            connect.SelectDemoDrive();
            cmbx_Vehicle.ItemsSource       = connect.table2.DefaultView;
            cmbx_Vehicle.DisplayMemberPath = "[Name of vehicle]";
            cmbx_Vehicle.SelectedValuePath = "ID";


            Dock_Decision.Visibility = Visibility.Visible;
        }