Page 1 of 1

Custom Quoting

PostPosted: Tue Jan 12, 2016 2:14 pm
by TomW
Hi Huys

We are supppliers of Plasma Cutting equipment and need to be able to supply consumable price lists for the various Plasma Systems our customers have. Currently this requires a fair amount of manual input to match the correct consumables to suit the customers system.

Our plan is to write a plugin that will read part numbers from an Excel spreadsheet, sort them by system and put the part number into the "PartNo" field of the quotes. I have the spreadsheet reading with the Excel interop and the sorting done and, was wondering if you could point me in the right direction with the best method to insert the part numbers into the grid.

The spreadsheet is a living thing, the part numbers and items are continually being delteted and or upgraded, the spreadsheet comes from the manufacturer when there is a change.

I am a bit of a newbie to Dot Net while I have experience in C and VB scripts I am still working on getting my head around the different ways of DotNet so any assistance will be greatly appreciated.

We are running Jiwa version 7.0.149 with Microsoft sql server 2012.

Re: Custom Quoting

PostPosted: Tue Jan 12, 2016 2:18 pm
by Scott.Pearce
Do you use C# or VB?

Edit: Are you going to write the plugin in C# or VB?

Re: Custom Quoting  Topic is solved

PostPosted: Tue Jan 12, 2016 3:19 pm
by Scott.Pearce
I've created a sample for you and attached it.

Right click on the XML file and save it to your local PC. Then import the plugin using Plugin Maintenance in Jiwa. Read the plugin description for information about what this plugin does.

Re: Custom Quoting

PostPosted: Tue Jan 12, 2016 3:59 pm
by TomW
Scott

VB is preferred thats what the boss likes.

I have got your sample and will let you know how I go.

Many Thanks

Re: Custom Quoting

PostPosted: Tue Jan 12, 2016 4:00 pm
by Scott.Pearce
I wrote it in C# but if that's a real problem I can rewrite the sample in VB.

Re: Custom Quoting

PostPosted: Fri Jan 15, 2016 12:09 pm
by TomW
Scott

The C# code was fine.
I now have the Excel spreadsheet using the Excel Interop integrated in with it and it functions well.

I have one more question on adding the part numbers to the form that is
what do I need to do to add just a text line as a header?

These parts have groups within each section which I forgot about when I did the original post.

Once again thanks very much for your assistance.

Tom

Re: Custom Quoting

PostPosted: Mon Jan 18, 2016 11:05 am
by Mike.Sheen
TomW wrote:what do I need to do to add just a text line as a header?


Hi Tom,

The AddCommentLine method of the Lines collection will add a comment line.

The signature looks like this:

Code: Select all
Public Sub AddCommentLine(ByVal CommentText As String, ByRef NewKey As String, Optional ByVal LineNumber As Integer = 0)


An example of use:

Code: Select all
String key = null;
salesQuoteEntryForm.SalesQuote.SalesQuoteLines.AddCommentLine("This is the comment line text", key, 0);


The last parameter (LineNumber) is optional - it's to override the insert position - if 0 is passed then it appends to the last line of the quote.

Mike

Re: Custom Quoting

PostPosted: Mon Jan 18, 2016 3:41 pm
by TomW
Mike

Thanks for that it works well.