List<ConsignmentNote> consignmentNotes = carrier.ConsignmentNoteCollection.Cast<ConsignmentNote>().ToList();
ConsignmentNote foundConnote = consignmentNotes.FirstOrDefault(c => c.ConsignmentNoteNo == request.Connotenumber);
if(foundConnote == null)
{
foundConnote = manager.CollectionItemFactory.CreateCollectionItem<ConsignmentNote>();
carrier.ConsignmentNoteCollection.Add(foundConnote);
}
foundConnote.ConsignmentNoteNo = request.Connotenumber;
foundConnote.ConsignmentNoteDate = DateTime.Parse( request.Condate);
foundConnote.ExGSTAmount = request.Rate;
foundConnote.GSTAmount = request.Gstamount;
Dim MyConsignNote As New JiwaFinancials.Jiwa.JiwaSales.SalesOrder.ConsignmentNote
Dim MyConsignNote As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.ConsignmentNote
MyConsignNote = Salesorder.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.ConsignmentNote)
eventually got it working with this piece of VB code, the C# does not convert to VB very well.
Ernst wrote:Thanks Mike have removed the New.
These are all the lovely errors, when you try and compile the converted VB,
Return to Technical and or Programming
Users browsing this forum: No registered users and 32 guests