Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 3 - Invoicing in Delphi: Show Me the Money
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Invoicing in Delphi: Show Me the Money
By: Chris Neeman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2007-07-09

    Table of Contents:
  • Invoicing in Delphi: Show Me the Money
  • Building the Database
  • Building the Application Interface
  • Finished Code
  • Rest of the Code and the Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    Iron Speed
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    Invoicing in Delphi: Show Me the Money - Building the Application Interface


    (Page 3 of 5 )

    Start a new project in Delphi and add seven forms to it. Save the units with the following names:

    Unit  Name    Save as...
     unit1           invmain
     unit2           newinv
     unit3           settings
     unit4           stats
     unit5           viewchange
     unit6           viewclients
     unit7           about

    Finally save the project as: invoicing. Now close all other forms except the one saved as invmain, because that is the one that we need to start developing first. Once you have Form1 in front of you, from the Standard tab drop the Mainmenu component on the form. Double click on it and add the following menu items:

    A file with a submenu item called Exit. Double click on the exit submenu item and add the following code:

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

    Now create the second menu item, called Clients, with a submenu item called Manage Clients. Double click on it and add the following code:

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

    Create the third menu item and call it Tools. Then add the following submenu items:

    Settings

    Double click on the above submenu item and add the following code:

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

    Statistics

    Double click on the above submenu item and add the following code:

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

    Then create the final menu item called Help, and add a submenu item called About. Double click on it and add the following code:

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

    That's it for the menu items. Now on the form add a panel and align it to "all top." Put on the panel the following components:

    Two radio buttons - Name them rb1 and rb2 respectively.Then give them the captions: Search by Invoice Name and Search by Invoice Number.

    Tedit - Name the edit "edsearch." Clear the text property if there is any text in it.

    Button - name the button "btnsearch" and add the caption "Search."

    Save your work. Next, from the Data Controls tab add the database grid and set its align property to all client. Double click on the grid and the column property editor should come up. Add five columns and give them the following captions:

    Invoice Number
    Invoice Name
    Invoice Date
    Status

    You add captions by going to the title property of each column.

    Next, we add another panel and set its align property to "alBottom." On this panel add the following widgets:

    • Two static text -- with caption names "Total Invoices" and "Current Invoice #."
    • Two labels
    • Three buttons, named btnDelete, btnAddInv and btnExit respectively. 

     To the three buttons, add the following code, in the order given:

    btnDelete:

    procedure TForm1.btndeleteClick(Sender: TObject);
    begin
     
    if ado1.RecordCount > 0 then 
      
    begin
       
    ado1.Delete;
     
    end
     
    else
       
    showmessage('No invoices to delete'); 
    end;

    btnAddInv:

    procedure TForm1.btnAddInvClick(Sender: TObject);
    begin
     
    ado1.Active:=false;
     
    //form1.ado1.TableName:='';
     
    form2.show;
    end;

    btnExit:

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

    Then finally drop a datasource component (name it d1) from the Data Access tab and an ADO table component (name it ado1) from the Ado Tab. Set form1's caption to Invoice Manager. That completes the design on the first form. Your form should look something like this:

    More Delphi-Kylix Articles
    More By Chris Neeman


     

    DELPHI-KYLIX ARTICLES

    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...
    - The Implementation of an FTP Server
    - FTP Server: The Theory


    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway