Exemplo n.º 1
0
        private void AddVehicleButton_Click(object sender, RoutedEventArgs e)
        {
            //initialize dataconnection variable
            DatabaseConnection dataConnect = new DatabaseConnection();

            string serialNum   = serialNumTxt.Text;
            string type        = typeTxt.Text;
            string make        = makeTxt.Text;
            string modelNumber = modelNumTxt.Text;
            string notes       = notesTxt.Text;

            string[] names = clientname.SelectedItem.ToString().Split(null);

            //TODO Error checking
            //send information to database connection
            dataConnect.AddNewVehicle(serialNum, type, make, modelNumber, notes, names[0], names[1]);
            AddVehicle1 create = new AddVehicle1();

            NavigationService.Navigate(create);
        }