SunQuest
 
       Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 5 - Looking at the Details for an Invoicing Ap...
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 
Moblin 
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

Looking at the Details for an Invoicing Application in Delphi
By: Chris Neeman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-07-16

    Table of Contents:
  • Looking at the Details for an Invoicing Application in Delphi
  • Settings Unit
  • New Invoice Form and Code
  • Invoice Management Code and Output
  • Client Management Code
  • Final output and 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
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Looking at the Details for an Invoicing Application in Delphi - Client Management Code


    (Page 5 of 6 )

    unit viewclients;

    interface

    uses

      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

      Dialogs, Grids, DBGrids, StdCtrls, DB, ADODB, Buttons, ExtCtrls, DBCtrls;

    type

      TForm6 = class(TForm)

        DBGrid1: TDBGrid;

        adoc: TADOTable;

        DataSource1: TDataSource;

        Panel1: TPanel;

        mem: TMemo;

        edname: TEdit;

        edcontact: TEdit;

        edfax: TEdit;

        edemail: TEdit;

        edphone: TEdit;

        StaticText1: TStaticText;

        StaticText2: TStaticText;

        StaticText3: TStaticText;

        StaticText4: TStaticText;

        StaticText5: TStaticText;

        StaticText6: TStaticText;

        btnAddC: TBitBtn;

        RadioButton1: TRadioButton;

        BitBtn1: TBitBtn;

        btnExit: TBitBtn;

        Panel2: TPanel;

        DBMemo1: TDBMemo;

        StaticText7: TStaticText;

        procedure Button1Click(Sender: TObject);

        procedure btnAddCClick(Sender: TObject);

        procedure btnExitClick(Sender: TObject);

        procedure RadioButton1Click(Sender: TObject);

        procedure FormActivate(Sender: TObject);

        procedure BitBtn1Click(Sender: TObject);

        procedure FormCreate(Sender: TObject);

      private

        { Private declarations }

      public

        { Public declarations }

       

      end;

    var

      Form6: TForm6;

    implementation

    {$R *.dfm}

    uses invmain;

    procedure activatewidgets;

    begin

    form6.edname.Enabled:=true;

    form6.edemail.Enabled:=true;

    form6.edphone.Enabled:=true;

    form6.edfax.Enabled:=true;

    form6.edcontact.Enabled:=true;

    form6.btnaddc.Enabled:=true;

    form6.mem.Enabled:=true;

    end;

    procedure de_activatewidgets;

    begin

    form6.edname.Enabled:=false;

    form6.edemail.Enabled:=false;

    form6.edphone.Enabled:=false;

    form6.edfax.Enabled:=false;

    form6.edcontact.Enabled:=false;

    form6.btnaddc.Enabled:=false;

    form6.mem.Enabled:=false;

    //empty the widgets

    form6.edname.Clear;

    form6.edemail.Clear;

    form6.edphone.Clear;

    form6.edfax.Clear;

    form6.edcontact.Clear;

    form6.mem.Clear;

    form6.RadioButton1.Checked:=false;

    end;

    procedure TForm6.Button1Click(Sender: TObject);

    begin

    close;

    end;

    procedure TForm6.btnAddCClick(Sender: TObject);

    begin

    with adoc do

    begin

    try

    Screen.Cursor := crHourGlass;

    Insert;

    FieldByName('name').Text := edname.Text;

    FieldByName('address').AsString :=mem.Lines.Text;

    FieldByName('email').text := edemail.text;

    FieldByName('phone').text :=edphone.Text;

    FieldByName('fax').text :=edfax.Text;

    FieldByName('contact').text := edcontact.Text;

    post;

    except on E : Exception do

    showmessage(e.Message);

    end;

    end;

    messagedlg(edname.text + ' has been added.',mtInformation,

          [mbOk], 0);

    Screen.Cursor := crDefault;

    de_activatewidgets;

    end;

    procedure TForm6.btnExitClick(Sender: TObject);

    begin

    close;

    end;

    procedure TForm6.RadioButton1Click(Sender: TObject);

    begin

    activatewidgets;

    end;

    procedure TForm6.FormActivate(Sender: TObject);

    begin

    de_activatewidgets;

    end;

    procedure TForm6.BitBtn1Click(Sender: TObject);

    begin

    if adoc.RecNo > 0 then

    adoc.Delete;

    adoc.Refresh;

    end;

    procedure TForm6.FormCreate(Sender: TObject);

    begin

    adoc.ConnectionString:=form1.con;

    adoc.Active:=true;

    dbgrid1.Hint:='Click to make changes to the client details. '+#13#10+' Any changes you make will automatically be updated.';

    end;

    end.

    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







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