objConn = New System.Data.SqlClient.SqlConnection(strConnString)
objConn.Open()
strSQL = " update _Order set _Order.OrderStatus=@OrderStatus,_Order.PaymentStatus=@PaymentStatus" & _
" where _Order.OrderID=" & datakey
objCmd = New System.Data.SqlClient.SqlCommand(strSQL, objConn)
With objCmd
.Parameters.Add("@OrderStatus", SqlDbType.Int).Value = CInt(IIf(Me.rddOrderStatus.SelectedItem.Value, 1, 0))
.Parameters.Add("@PaymentStatus", SqlDbType.Int).Value = CInt(IIf(Me.rddPaymentStatus.SelectedItem.Value, 1, 0))
End With
strSQL2 = " update DeliveryDetail set DeliveryDetail.DeliveryStatus=@DeliveryStatus where DeliveryDetail.OrderID=_Order.OrderID and _Order.OrderID=" & datakey
objCmd2 = New System.Data.SqlClient.SqlCommand(strSQL2, objConn)
With objCmd2
.Parameters.Add("@DeliveryStatus", SqlDbType.Int).Value = CInt(IIf(Me.rddDeliveryStatus.SelectedItem.Value, 1, 0))
End With
objCmd.ExecuteNonQuery()
objCmd2.ExecuteNonQuery()