Custom Quoting  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Custom Quoting

Postby TomW » Tue Jan 12, 2016 2:14 pm

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.
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1

Re: Custom Quoting

Postby Scott.Pearce » Tue Jan 12, 2016 2:18 pm

Do you use C# or VB?

Edit: Are you going to write the plugin in C# or VB?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Custom Quoting  Topic is solved

Postby Scott.Pearce » Tue Jan 12, 2016 3:19 pm

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.
Attachments
Plugin Add Lines to a Quote.xml
(33.79 KiB) Downloaded 1041 times
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Custom Quoting

Postby TomW » Tue Jan 12, 2016 3:59 pm

Scott

VB is preferred thats what the boss likes.

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

Many Thanks
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1

Re: Custom Quoting

Postby Scott.Pearce » Tue Jan 12, 2016 4:00 pm

I wrote it in C# but if that's a real problem I can rewrite the sample in VB.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Custom Quoting

Postby TomW » Fri Jan 15, 2016 12:09 pm

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
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1

Re: Custom Quoting

Postby Mike.Sheen » Mon Jan 18, 2016 11:05 am

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Custom Quoting

Postby TomW » Mon Jan 18, 2016 3:41 pm

Mike

Thanks for that it works well.
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests