|
-
Feb 3rd, 2003, 12:53 AM
#1
Thread Starter
Addicted Member
Create an invoice in VB.NET
Hey everyone,
I'm making a program that needs to be able to create invoices for the customers.
I'm using a SQL server to store all my customers, and inventory. So I need to be able to create the invoice using the information from the SQL Server.
What would be the best way to go about doing this?
I've read that Crystal reports would probally work for this but I've never used it and I was just wanting some opinions on the matter? And if I was to use CR, then would it be best to use the built-in CR with .NET or to use Cyrstal reports Developers edition 8.0?
Thanks for the help in advance?
-
Feb 3rd, 2003, 05:33 AM
#2
Addicted Member
I reckon the most common way to do this is to map a data class to the table structure (INVOICE table), then use a collection class to hold multiple instances of individual invoices ( a customer might have multiple invoices i presume) for each read/write operation. That any help?
-
Feb 3rd, 2003, 01:12 PM
#3
Thread Starter
Addicted Member
Yeah your right, the customer will be able to have more than 1 invoice. You answered my next question that I had not the one I asked but that's good thanks.
But I dont know how to do what you said, "to map a data class to the table structure(invoice table), then use a collection class to hold multiple instances of individual invoices"?
As to my first question, I was just meaning what would be the best way to actually create the layout of the invoice, for priting and such?
Thanks for the help!
-
Feb 4th, 2003, 04:26 AM
#4
Addicted Member
Sorry i misunderstood the first bit about the presentation , i have never really used CR to any great degree but i guess it's as good as any for this kind of thing. As for point 2 - create a class with properties that match the table you wish to read/write to. for example, the table INVOICE will have a field AMOUNT and DATE. Your class (also called INVOICE) should have 2 properties called AMOUNT and DATE, changes are you will have no methods in the class, only properties - this is your data class (a structure for holding database information). You will then need a collection class , inherited from CollectionBase or List - you will shadow their methods (ADD, REMOVE, COUNT, CLEAR etc) with your own implementations. You will then need a controller class that will perform the actual read/writes. From your front end the user will create a new INVOICE object, set it's properties (DATE, AMOUNT etc) from the textboxes, then ADD the new object to the INVOICES collection before performing the update thru the controller class.
This any help?? It's early in the morning where i am, I feel tired and confused
so just shout if you need an example or something...
-
Feb 4th, 2003, 01:44 PM
#5
Thread Starter
Addicted Member
thanks for the concept...but could you give me an example, cause I really dont know how to implement exactly what you said.
So do I even need to have a table in my sql server then for Invoices?
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|