Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

It was not found NullReferenceException

$
0
0

I need help with the following error , I am trying to delete a data of a gridview when you click on the " remove services button " send me the following error:

An unhandled exception of type ' System.NullReferenceException ' in YonkerCarlosSistema.exe

Additional information: Object reference not set to an instance of an object.

This is the code that is on the button:

01.Private Sub btnQuitarServicio_Click(sender As Object, e As EventArgs) Handles btnQuitarServicio.Click
02. If True Then
03.            Dim SelectedRowView As System.Data.DataRowView
04.            Dim SelectedRow As yonker_sistemaDataSet.facturarepuestodetalleRow
05.            SelectedRowView = CType(FacturarepuestodetalleBindingSource.Current, System.Data.DataRowView)
06.            SelectedRow = CType(SelectedRowView.Row, yonker_sistemaDataSet.facturarepuestodetalleRow)  <---- AQUI ME MARCA EL ERROR
07.            Me.FacturarepuestodetalleTableAdapter.Eliminar(SelectedRow.CodigoSucursal, SelectedRow.NumeroFacturaRepuesto, SelectedRow.CodigoMarca, SelectedRow.CodigoModelo, SelectedRow.Anio, SelectedRow.CodigoTipoParte)
08.            'Reversion al  inventario 
09.            Dim CantidadActual As Integer = 0
10.            CantidadActual = Convert.ToInt32(Me.Partes_carroTableAdapter.ConsultarCantidad(SelectedRow.CodigoSucursal, SelectedRow.CodigoMarca, SelectedRow.CodigoModelo, SelectedRow.Anio, SelectedRow.CodigoTipoParte))
11.            Me.Partes_carroTableAdapter.Actualizar(Convert.ToInt32(CantidadActual + SelectedRow.Cantidad), UsuarioTextBox.Text, FechaDateTimePicker.Value.ToString(), "Se Devolvio Repuesto", SelectedRow.CodigoSucursal, SelectedRow.CodigoMarca, _
12.                SelectedRow.CodigoModelo, SelectedRow.Anio, SelectedRow.CodigoTipoParte)
13.            Me.FacturarepuestodetalleTableAdapter.FillByCodigo(Me.Yonker_sistemaDataSet.facturarepuestodetalle, Convert.ToInt32(CodigoSucursalTextBox.Text), Convert.ToInt32(NumeroFacturaRepuestoTextBox.Text))
14.            ActualizaqrPrecioTotal()
15.        End If
16.end sub

 

I need help with the following error , I am trying to delete a data of a gridview when you click on the " remove services button " send me the following error: An unhandled exception of type ' System.NullReferenceException ' in YonkerCarlosSistema.exe Additional information: Object reference not set to an instance of an object. This is the code that is on the button:
I need help with the following error , I am trying to delete a data of a gridview when you click on the " remove services button " send me the following error: An unhandled exception of type ' System.NullReferenceException ' in YonkerCarlosSistema.exe Additional information: Object reference not set to an instance of an object. This is the code that is on the button:
I need help with the following error , I am trying to delete a data of a gridview when you click on the " remove services button " send me the following error: An unhandled exception of type ' System.NullReferenceException ' in YonkerCarlosSistema.exe Additional information: Object reference not set to an instance of an object. This is the code that is on the button:

Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>