Click here to Skip to main content
15,896,606 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow can i blink the color of lable in the DatagridItemTemplate? Pin
Guru_yogi17-Jul-07 19:55
Guru_yogi17-Jul-07 19:55 
AnswerRe: How can i blink the color of lable in the DatagridItemTemplate? Pin
Nilesh Hapse18-Jul-07 1:20
Nilesh Hapse18-Jul-07 1:20 
QuestionHow to drag a treeview node from a VB app to a VB.NET app? Pin
sj_aus17-Jul-07 18:20
sj_aus17-Jul-07 18:20 
AnswerRe: How to drag a treeview node from a VB app to a VB.NET app? Pin
Paul Conrad29-Jul-07 6:12
professionalPaul Conrad29-Jul-07 6:12 
QuestionMDI Applications on VB .NET Pin
muzzybee17-Jul-07 17:44
muzzybee17-Jul-07 17:44 
AnswerRe: MDI Applications on VB .NET Pin
Dave Kreskowiak18-Jul-07 2:09
mveDave Kreskowiak18-Jul-07 2:09 
QuestionReflection on a Collection Object Pin
twista17-Jul-07 13:27
twista17-Jul-07 13:27 
QuestionVB.NET Web Services question Pin
Subrat Parida17-Jul-07 13:00
Subrat Parida17-Jul-07 13:00 
Hi,

I am calling a web services in VB.NET. The code is almost done but I am getting an error at shipping section that I don't know how to fix. I think it is very simple but I don't know how to figure it out.

Error is “Too many arguments to ‘Public Sub New()’ at value 1” at this line “Shipment.ShipmentItems = New ShipmentItem(1)”. I am not still sure that this is the right way of calling shipment class because shipment is a sub-class of salesorder.

----------------------------------------------------------------

Dim aToken As UsernameToken = New UsernameToken("test@abc.com", "test123", PasswordOption.SendPlainText)
mSalesOrderWse = New SalesOrderService
mSalesOrderWse.RequestSoapContext.Security.Timestamp.TtlInSeconds = 30
mSalesOrderWse.RequestSoapContext.Security.Tokens.Add(aToken)

Dim OrderRequest As New CheckComplianceOfSalesOrderRequest

OrderRequest.AddressOption = New SalesOrder.AddressOption
OrderRequest.AddressOption.IgnoreStreetLevelErrors = "True"
OrderRequest.AddressOption.RejectIfAddressSuggested = "True"

OrderRequest.PersistOption = PersistOption.Null

OrderRequest.SalesOrder = New SalesOrder.SalesOrder
OrderRequest.SalesOrder.BillTo = New SalesOrder.Address
OrderRequest.SalesOrder.BillTo.City = ocity
OrderRequest.SalesOrder.BillTo.Company = ocompany
OrderRequest.SalesOrder.BillTo.Country = ocountry
OrderRequest.SalesOrder.BillTo.County = ""
OrderRequest.SalesOrder.BillTo.Email = oemail
OrderRequest.SalesOrder.BillTo.Fax = ""
OrderRequest.SalesOrder.BillTo.FirstName = ofirstname
OrderRequest.SalesOrder.BillTo.LastName = olastname
OrderRequest.SalesOrder.BillTo.Phone = ophone
OrderRequest.SalesOrder.BillTo.State = ostate
OrderRequest.SalesOrder.BillTo.Street1 = oaddress
OrderRequest.SalesOrder.BillTo.Street2 = oaddress2
OrderRequest.SalesOrder.BillTo.Zip1 = opostcode
OrderRequest.SalesOrder.BillTo.Zip2 = ""

OrderRequest.SalesOrder.CustomerKey = custnmbr
OrderRequest.SalesOrder.FulfillmentType = FulfillmentType.Null
OrderRequest.SalesOrder.OrderType = OrderType.Internet
OrderRequest.SalesOrder.PurchaseDate = odate
OrderRequest.SalesOrder.SalesOrderKey = sopnumbe

Dim ShipmentItem2 As New ShipmentItem

ShipmentItem2.BrandKey = "SS_WINE"
ShipmentItem2.ProductKey = "04SSBOTELLA750"
ShipmentItem2.ProductQuantity = 1
ShipmentItem2.ProductUnitPrice = 20

Dim Shipment As New Shipment
Shipment.Freight = oshipcost
Shipment.LicenseRelationship = LicenseRelationship.SupplierToConsumer
Shipment.ShipDate = deliverydate
Shipment.ShipmentKey = "1"
Shipment.ShipmentStatus = ShipmentStatus.PaymentAccepted
Shipment.ShippingService = ShippingService.FXG
Shipment.InsuredAmount = 0
Shipment.GiftNote = ""
Shipment.SpecialInstructions = ocomment

Shipment.ShipTo = New Address
Shipment.ShipTo.Company = oshipcompany
Shipment.ShipTo.FirstName = oshipFName
Shipment.ShipTo.LastName = oshipLName
Shipment.ShipTo.City = oshiptown
Shipment.ShipTo.State = oshipstate
Shipment.ShipTo.Street1 = oshipaddress
Shipment.ShipTo.Street2 = oshipaddress2
Shipment.ShipTo.Country = oshipcountry
Shipment.ShipTo.Zip1 = oshipzip
Shipment.ShipTo.Zip2 = ""
Shipment.ShipTo.Fax = ""
Shipment.ShipTo.Phone = ship_phone
Shipment.ShipTo.Email = oemail
Shipment.ShipTo.County = ""

Shipment.ShipmentItems = New ShipmentItem(1)
Shipment.ShipmentItems(0) = ShipmentItem2

OrderRequest.SalesOrder.Shipments = New Shipment(1)
OrderRequest.SalesOrder.Shipments(0) = Shipment

OrderResponse = mSalesOrderWse.CheckComplianceOfSalesOrder(OrderRequest)

-----------------------------------------------

This secure class code was autometically generated.

_
Public Class SalesOrder
Public BillTo As Address
Public CustomerKey As String
Public FulfillmentType As FulfillmentType
Public OrderType As OrderType
Public PurchaseDate As Date
Public SalesOrderKey As String
Public Shipments() As Shipment
End Class

_
Public Class Address
Public City As String
Public Company As String
Public Country As String
Public County As String
Public DateOfBirth As Date
Public Email As String
Public Fax As String
Public FirstName As String
Public LastName As String
Public Phone As String
Public State As String
Public Street1 As String
Public Street2 As String
Public Zip1 As String
Public Zip2 As String
End Class

_
Public Class Shipment
Public Freight As Double
Public GiftNote As String
Public InsuredAmount As Double
Public LicenseRelationship As LicenseRelationship
Public Packages() As Package
Public ShipDate As Date
Public ShipmentItems() As ShipmentItem
Public ShipmentKey As String
Public ShipmentStatus As ShipmentStatus
Public ShippingService As ShippingService
Public ShipTo As Address
Public SpecialInstructions As String
End Class

_
Public Class ShipmentItem
Public BrandKey As String
Public ProductKey As String
Public ProductQuantity As Integer
Public ProductUnitPrice As Double
End Class

----------------------------------------------

Thanks,
Subrat Parida
Programmer
AnswerRe: VB.NET Web Services question Pin
_Damian S_17-Jul-07 15:26
professional_Damian S_17-Jul-07 15:26 
GeneralRe: VB.NET Web Services question Pin
Subrat Parida18-Jul-07 9:38
Subrat Parida18-Jul-07 9:38 
GeneralRe: VB.NET Web Services question Pin
Dave Kreskowiak18-Jul-07 11:40
mveDave Kreskowiak18-Jul-07 11:40 
GeneralRe: VB.NET Web Services question Pin
Subrat Parida18-Jul-07 15:06
Subrat Parida18-Jul-07 15:06 
Questionwhy no delete? Pin
boyindie17-Jul-07 12:34
boyindie17-Jul-07 12:34 
AnswerRe: why no delete? Pin
RepliCrux17-Jul-07 13:11
RepliCrux17-Jul-07 13:11 
GeneralRe: why no delete? Pin
boyindie17-Jul-07 13:20
boyindie17-Jul-07 13:20 
GeneralRe: why no delete? Pin
boyindie17-Jul-07 13:23
boyindie17-Jul-07 13:23 
QuestionDatabase permissions Pin
Cory Kimble17-Jul-07 10:43
Cory Kimble17-Jul-07 10:43 
AnswerRe: Database permissions Pin
Dave Kreskowiak17-Jul-07 11:05
mveDave Kreskowiak17-Jul-07 11:05 
AnswerRe: Database permissions Pin
leckey17-Jul-07 11:20
leckey17-Jul-07 11:20 
GeneralRe: Database permissions Pin
Cory Kimble18-Jul-07 3:13
Cory Kimble18-Jul-07 3:13 
GeneralRe: Database permissions Pin
Dave Kreskowiak18-Jul-07 11:42
mveDave Kreskowiak18-Jul-07 11:42 
QuestionByRef in class property setters Pin
Ahmad Zaidi17-Jul-07 9:16
Ahmad Zaidi17-Jul-07 9:16 
AnswerRe: ByRef in class property setters Pin
Dave Kreskowiak17-Jul-07 10:15
mveDave Kreskowiak17-Jul-07 10:15 
AnswerRe: ByRef in class property setters Pin
Guffa17-Jul-07 11:45
Guffa17-Jul-07 11:45 
AnswerRe: ByRef in class property setters Pin
Ahmad Zaidi17-Jul-07 22:26
Ahmad Zaidi17-Jul-07 22:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.