Home arrow Delphi-Kylix arrow Page 5 - Invoicing in Delphi: Show Me the Money
DELPHI-KYLIX

Invoicing in Delphi: Show Me the Money


Have you been looking for a way to tame the invoices in your small business? In this article, the first of two parts, we are going to create a fully functioning invoicing system that can be used in almost any environment and situation. Interested? Keep reading.

Author Info:
By: Chris Neeman
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
July 09, 2007
TABLE OF CONTENTS:
  1. · Invoicing in Delphi: Show Me the Money
  2. · Building the Database
  3. · Building the Application Interface
  4. · Finished Code
  5. · Rest of the Code and the Conclusion

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Invoicing in Delphi: Show Me the Money - Rest of the Code and the Conclusion
(Page 5 of 5 )

procedure TForm1.Statistics1Click(Sender: TObject);
begin
 
form4.show;
end;

procedure TForm1.btnsearchClick(Sender: TObject);
begin
 
if edsearch.Text = '' then showmessage('Please enter a term for the search!') else
 
begin
   
//now check to see that the user selected a search method
   
if not rb1.Checked and not rb2.Checked then begin
     
messagedlg('Either select to search by: '+#13#10+' Invoice number OR Invoice name', mtError , [mbOK], 0);
     
exit;
   
end;
   
//search by invoice name
   
if rb1.Checked then
   
begin
     
if not form1.ado1.Locate('invname',edsearch.Text,[]) then
       
messagedlg(' Invoice for "' +edsearch.Text+ '" was not found', mtError ,[mbOK], 0);
   
end;
   
//search by invoice number 

    if rb2.Checked then
   
begin
     
//check to see if entered value is number, before continuing
     
try
       
StrToInt(edsearch.Text); 
    
  except
       
messagedlg('Please enter a number in the search box.'+#13#10+' You entered "' +edsearch.Text+ '" which is not a number!', mtError , [mbOK],0);
     
exit;
   
end;

    if not form1.ado1.Locate('invno',edsearch.Text,[]) then
     
messagedlg(' Invoice number ' +edsearch.Text+ ' could not be found',

    mtError , [mbOK], 0);
   
end;//end rb2 search
 
end;//edsearch check
end;

procedure TForm1.Settings1Click(Sender: TObject);
begin
 
form3.show
end;

procedure TForm1.ViewAllClients1Click(Sender: TObject);
begin
 
form6.show;
end;

procedure TForm1.About1Click(Sender: TObject);
begin
 
form7.show;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
 
close;
end;

procedure TForm1.ado1AfterPost(DataSet: TDataSet);
begin
 
showmessage('It is done');
 
label1.caption:=inttostr(ado1.RecordCount);
end;

procedure TForm1.ado1AfterScroll(DataSet: TDataSet);
begin
 
label2.caption:=inttostr(ado1.Recno); 
end;
end.

Conclusion

In the next article we will not focus so much on the design of the application, but rather on the code that makes it work. We will also be introducing invoice reporting using Rave Reporting components.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials