Ok,Guys i try to exmplane you all steps for you understand what i`m doing and thanks for help.
I have a button import and when I click on it I get the data from all knuckles and enter them in the database, but nothing I want to be a box and the database does not introduce anything other stock exchange introduces. Like that
Adapter.Insert(OrderCategory, _
SampleOrder, _
Requester, _
ProjectNumber, _
CostCenter, _
PersonInvoiced, _
SampleCategory, _
Quantity, _
Nothing, _
Description, _
RecipientName, _
DesiredDelivery, _
AssemblyPlannedDate, _
Coordonator, _
ShippingMode, _
ShippingAddress, _
Urgent, _
BOM, _
Hazardous, _
Transporter, _
SerialComponents, _
PrototypeComponents, _
ReadyAssembly, _
Status)
Ok, is perfect, i have all value in my database.
But when i try to fill al boxes with all value display that error.
Ok, i have a edit form where i try to fill all boxes and all DopDownList, but where is nothing (InvoiceValue) i want to put nothing in value for edit and update with another value.
Here is my code where i fill boxes.
Dim RowID As Integer = Nothing
If GridView1.Rows.Count > 0 Then
If GridView1.SelectedValue <> Nothing Then
RowID = GridView1.SelectedValue
End If
End If
Dim MyAdapter As New MV_SamplesOrdersTableAdapters.Orders_HeaderTableAdapter
Dim DT As MV_SamplesOrders.Orders_HeaderDataTable = MyAdapter.GetDataByID(RowID)
If DT.Rows.Count > 0 Then
BOX_SampleOrder1.Enabled = False
DDL_OrderCategory1.Text = DT(0).OrderType
BOX_SampleOrder1.Text = DT(0).DVMOrderNumber
BOX_Requester1.Text = DT(0).Requester
BOX_ProjectNumber1.Text = DT(0).ProjectNumber
BOX_PersonInvoiced1.Text = DT(0).CostResponsable
DDL_SampleCategory1.Text = DT(0).SampleOrderType
BOX_Quantity1.Text = DT(0).TotalSamples
BOX_CostCenter1.Text = DT(0).CostCenter
If DT(0).InvoiceValue <> Nothing Then
BOX_SampleInvoice.Text = DT(0).InvoiceValue
End If
BOX_Description1.Text = DT(0).OrderDescription
BOX_RecipientName1.Text = DT(0).FinalCustomerAddress
BOX_DesiredDelivery1.Text = DT(0).TargetDate
BOX_AssemblyPlannedDate1.Text = DT(0).AssemblyPlannedDate
DDL_Coordonator1.Text = DT(0).LogisticsResponsable
DDL_ShippingMode1.Text = DT(0).ShippingMode
DDL_Transporter1.Items.Clear()
DDL_Transporter1.Items.Add(DT(0).ExpressShipment)
BOX_ShippingAddress1.Text = DT(0).ShippingAddress
DBL_Urgent1.Text = DT(0).Urgent
RBL_Hazardous1.Text = DT(0).HazardousMaterial
RBL_BOM1.Text = DT(0).HasBOM
RBL_SerialComponents1.Text = DT(0).HasSerialComponents
RBL_PrototypeComponents1.Text = DT(0).PrototypeComponents
RBL_ReadyAssembly1.Text = DT(0).ReadyForAssembly
DDL_Status1.Text = DT(0).Status
End If
Here display my error, where i have "if" is a problem. Is <> Nothing, but my problem is to fill that box with nothing or jump this step. Thanks