private void btnSave_Click(object sender, RoutedEventArgs e) { Maintenace nwMaintenace = new Maintenace() { AmountPaid = Convert.ToDecimal(txtAmount.Text), CarID = Convert.ToByte(cmbCarReg.SelectedValue), Date = Convert.ToDateTime(dtpDate.SelectedDate), Description = txtDescription.Text, InstructorID = Convert.ToInt32(cmbInstructor.SelectedValue), InvoiceNumber = txtInvoice.Text, TypeID = Convert.ToByte(cmbType.SelectedValue), Notes = txtNotes.Text //UserID= }; DbInsert.InsertMaintenaceData(nwMaintenace); LoadDataGrid(); MessageBox.Show("Vehicle Added", "NEW VEHICLE", MessageBoxButton.OK, MessageBoxImage.Information); }