《2022年财务管理系统附程序源代码 .pdf》由会员分享,可在线阅读,更多相关《2022年财务管理系统附程序源代码 .pdf(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、附程序源代码:program xmjl; uses Forms, windows, main in main.pas Form1, dm in dm.pas dm2: TDataModule, about in about.pas AboutBox, report in report.pas qr1: TQuickRep, logosrc in logosrc.pas logo, login in login.pas denglu; $R *.res begin Application.Initialize; logo:=tlogo.Create(application); logo.Show
2、; logo.Update; Application.CreateForm(Tdm2, dm2); Application.CreateForm(Tdenglu, denglu); sleep(1000); logo.Hide; logo.Free; Application.Run; end. unit logosrc; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, jpeg, ExtCtrls; type Tlogo = class(TFor
3、m) Image1: TImage; private Private declarations public 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 13 页 - - - - - - - - - Public declarations end; var logo: Tlogo; implementation $R *.dfm end. unit login; interface uses Windows, Messages, SysUtils, Variants,
4、 Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Mask, Buttons; type Tdenglu = class(TForm) BitBtn1: TBitBtn; BitBtn2: TBitBtn; ComboBox1: TComboBox; MaskEdit1: TMaskEdit; Label1: TLabel; Label2: TLabel; procedure BitBtn2Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure
5、 BitBtn1Click(Sender: TObject); private Private declarations public Public declarations end; var denglu: Tdenglu; implementation uses dm,main; $R *.dfm 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 13 页 - - - - - - - - - procedure Tdenglu.BitBtn2Click(Sender:
6、TObject); begin application.Terminate; end; procedure Tdenglu.FormCreate(Sender: TObject); begin with dm2.ADOTable1 do begin open; first; while not eof do begin combobox1.Items.Add(fields0.Value ); next; end; combobox1.ItemIndex :=0; end; end; procedure Tdenglu.BitBtn1Click(Sender: TObject); begin w
7、ith dm2.ADOTable1 do begin if locate(us,combobox1.Text,) then begin if maskedit1.text=fields1.Value then begin hide; with tform1.Create(self) do showmodal; end; application.Terminate ; end; end; end; end. unit main; interface 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - -
8、- - 第 3 页,共 13 页 - - - - - - - - - uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ToolWin, Menus, DBActns, ActnList, DB, ExtCtrls, StdCtrls, Mask, DBCtrls, ImgList, Buttons, Grids, DBGrids; type TForm1 = class(TForm) PageControl1: TPageControl; Sta
9、tusBar1: TStatusBar; TabSheet1: TTabSheet; TabSheet2: TTabSheet; TabSheet3: TTabSheet; TabSheet5: TTabSheet; MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; N4: TMenuItem; N5: TMenuItem; N8: TMenuItem; N9: TMenuItem; N10: TMenuItem; N12: TMenuItem; N13: TMenuItem; N14: TMenuItem; N15: TMenuItem;
10、 N16: TMenuItem; N17: TMenuItem; N18: TMenuItem; DataSource1: TDataSource; ActionList1: TActionList; DataSetFirst1: TDataSetFirst; DataSetPrior1: TDataSetPrior; DataSetNext1: TDataSetNext; DataSetLast1: TDataSetLast; DataSetInsert1: TDataSetInsert; DataSetDelete1: TDataSetDelete; DataSetEdit1: TData
11、SetEdit; DataSetPost1: TDataSetPost; Panel1: TPanel; Panel2: TPanel; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 13 页 - - - - - - - - - Label5: TLabel; DBEdit1: TDBEdit; DBEdit2: TDBEdit; DBEdit
12、9: TDBEdit; DBEdit10: TDBEdit; DBEdit11: TDBEdit; Panel3: TPanel; BitBtn1: TBitBtn; BitBtn2: TBitBtn; BitBtn3: TBitBtn; BitBtn4: TBitBtn; ImageList1: TImageList; BitBtn5: TBitBtn; BitBtn10: TBitBtn; Label25: TLabel; Label26: TLabel; Panel4: TPanel; BitBtn6: TBitBtn; BitBtn7: TBitBtn; BitBtn8: TBitBt
13、n; BitBtn9: TBitBtn; BitBtn11: TBitBtn; BitBtn12: TBitBtn; BitBtn13: TBitBtn; Panel8: TPanel; DBGrid1: TDBGrid; Panel9: TPanel; Label27: TLabel; ComboBox1: TComboBox; Label28: TLabel; Edit1: TEdit; BitBtn14: TBitBtn; BitBtn15: TBitBtn; Panel13: TPanel; DBGrid3: TDBGrid; Panel14: TPanel; Label59: TLa
14、bel; Label60: TLabel; ComboBox3: TComboBox; Edit3: TEdit; BitBtn18: TBitBtn; BitBtn19: TBitBtn; BitBtn21: TBitBtn; Timer1: TTimer; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 13 页 - - - - - - - - - Label6: TLabel; DBEdit3: TDBEdit; Panel5: TPanel; Label7: TL
15、abel; Label8: TLabel; Label9: TLabel; Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; DBEdit4: TDBEdit; DBEdit5: TDBEdit; DBEdit6: TDBEdit; DBEdit7: TDBEdit; DBEdit8: TDBEdit; DBEdit12: TDBEdit; TabSheet4: TTabSheet; Panel6: TPanel; GroupBox1: TGroupBox; SpeedBut
16、ton1: TSpeedButton; DBGrid2: TDBGrid; DBEdit13: TDBEdit; DBEdit14: TDBEdit; DBNavigator1: TDBNavigator; Label15: TLabel; Label16: TLabel; DataSource2: TDataSource; procedure N9Click(Sender: TObject); procedure N10Click(Sender: TObject); procedure N12Click(Sender: TObject); procedure N8Click(Sender:
17、TObject); procedure N14Click(Sender: TObject); procedure N5Click(Sender: TObject); procedure BitBtn5MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure filldata(sender:tcombobox); procedure search(f1:tcombobox;t1:tedit); procedure dispall; procedure FormActiv
18、ate(Sender: TObject); procedure BitBtn14Click(Sender: TObject); procedure BitBtn15Click(Sender: TObject); procedure BitBtn13Click(Sender: TObject); 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 13 页 - - - - - - - - - procedure BitBtn17Click(Sender: TObject); p
19、rocedure BitBtn21Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure BitBtn11MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure BitBtn18Click(Sender: TObject); procedure SpeedButton1Click(Sender: TObject); private Private declarations p
20、ublic Public declarations end; var Form1: TForm1; implementation uses about,dm,report,login; $R *.dfm procedure TForm1.N9Click(Sender: TObject); begin tabsheet2.Show; end; procedure TForm1.N10Click(Sender: TObject); begin tabsheet3.Show; end; procedure TForm1.N12Click(Sender: TObject); begin tabshee
21、t5.Show; end; procedure TForm1.N8Click(Sender: TObject); begin tabsheet1.Show; end; procedure TForm1.N14Click(Sender: TObject); begin application.Terminate ; end; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 13 页 - - - - - - - - - procedure TForm1.N5Click(Sen
22、der: TObject); begin with taboutbox.Create(self) do ShowModal ; end; procedure TForm1.BitBtn5MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin dbedit1.Text:=inttostr(dm2.adoquery1.RecordCount+1); dbedit2.SetFocus; end; procedure TForm1.filldata(sender:tcombobox
23、); var iCount: Integer; /将从数据模块中取得的数据库表的字段名填入ComboBox 中begin sender.Items.Clear; /首先清空ComboBox 中 Items 的值for iCount := 0 to DM2.ADOQuery1.Fields.Count - 2 do begin sender.Items.Add(DM2.ADOQuery1.FieldsiCount.FieldName); /加入字段名DM2.ADOQuery1.Next; /向下移动到下一个字段end; sender.ItemIndex := 0; /设置表单刚出现时ComboB
24、ox 的值为第一个end; procedure TForm1.search(f1:tcombobox;t1:tedit); /自定义过程search(在数据库中搜寻指定条件的数据) var SearchField: string; /要查找的字段名SearchValue: string; /要查找的字段值begin SearchField := Trim(f1.Text); /将 ComboBox 的值赋给SearchField SearchValue := % + Trim(t1.Text) + %; /将 Edit 的值赋给SearchField with DM2.ADOQuery1 do
25、 begin close; /先关闭数据模块中的ADOQuery sql.Clear; /清空 ADOQuery 中的 SQL 值sql.Add(select * from xmb where + SearchField + like + SearchValue + ); /进行数据查询的SQL 语句( SearchFidel 和 SearchValue / 分别赋到SQL 语句中end; Dm2.ADOQuery1.Open; /打开数据模块中的ADOQuery 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 -
26、 - - - - - - 第 8 页,共 13 页 - - - - - - - - - end; procedure TForm1.FormActivate(Sender: TObject); begin filldata(combobox1); filldata(combobox3); tabsheet1.Show; end; procedure TForm1.BitBtn14Click(Sender: TObject); begin search(combobox1,edit1); end; procedure TForm1.BitBtn15Click(Sender: TObject);
27、begin dispall; end; procedure TForm1.dispall; begin with dm2.ADOQuery1 do begin close; sql.clear; sql.Add(select * from xmb); open; end; end; procedure TForm1.BitBtn13Click(Sender: TObject); begin if MessageDlg( 你确信要删除记录?,mtwarning,mbok,mbcancel,0)=mrok then DM2.ADOQuery1.Delete; end; procedure TFor
28、m1.BitBtn17Click(Sender: TObject); begin dispall; end; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 13 页 - - - - - - - - - procedure TForm1.BitBtn21Click(Sender: TObject); begin with tqr1.Create(self) do Preview; end; procedure TForm1.Timer1Timer(Sender: TObj
29、ect); begin statusbar1.Panels3.Text :=timetostr(now); statusbar1.Panels4.Text :=formatdatetime(yyyy年 MM 月 dd 日,now); end; procedure TForm1.BitBtn11MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin dbedit12.SetFocus; end; procedure TForm1.BitBtn18Click(Sender: T
30、Object); begin search(combobox3,edit3); end; procedure TForm1.SpeedButton1Click(Sender: TObject); begin with dm2.ADOQuery1 do begin close; sql.Clear; sql.Add(delete * from xmb); ExecSQL; close; sql.Clear; sql.Add(select * from xmb); open; end; end; end. unit dm; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - -
31、- - - - - - - - - - 名师精心整理 - - - - - - - 第 10 页,共 13 页 - - - - - - - - - interface uses SysUtils, Classes, ADODB, DB; type Tdm2 = class(TDataModule) ADOConnection1: TADOConnection; ADOQuery1: TADOQuery; ADOQuery1DSDesigner: TWideStringField; ADOQuery1DSDesigner2: TBCDField; ADOQuery1DSDesigner3: TBC
32、DField; ADOQuery1DSDesigner4: TDateTimeField; ADOQuery1DSDesigner5: TWideStringField; ADOQuery1total: TCurrencyField; ADOTable1: TADOTable; procedure ADOQuery1CalcFields(DataSet: TDataSet); private Private declarations public Public declarations end; var dm2: Tdm2; implementation $R *.dfm procedure
33、Tdm2.ADOQuery1CalcFields(DataSet: TDataSet); begin adoquery1total.Value :=ADOQuery1DSDesigner2.V alue - ADOQuery1DSDesigner3.value ; end; end. unit report; interface uses Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ExtCtrls, Forms, QuickRpt, QRCtrls, DB, ADODB; 名师资料总结 - - -精品
34、资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 11 页,共 13 页 - - - - - - - - - type Tqr1 = class(TQuickRep) ColumnHeaderBand1: TQRBand; TitleBand1: TQRBand; QRLabel1: TQRLabel; DetailBand1: TQRBand; QRLabel2: TQRLabel; QRLabel3: TQRLabel; QRLabel4: TQRLabel; QRLabel5: TQRLabel; QRLa
35、bel6: TQRLabel; QRLabel7: TQRLabel; QRDBText1: TQRDBText; QRDBText2: TQRDBText; QRDBText3: TQRDBText; QRDBText4: TQRDBText; QRDBText5: TQRDBText; QRDBText6: TQRDBText; QRShape1: TQRShape; QRShape2: TQRShape; QRShape3: TQRShape; QRShape7: TQRShape; QRShape8: TQRShape; QRShape9: TQRShape; SummaryBand1
36、: TQRBand; QRSysData1: TQRSysData; QRLabel8: TQRLabel; QRLabel9: TQRLabel; QRSysData2: TQRSysData; QRLabel10: TQRLabel; QRSysData3: TQRSysData; private public end; var qr1: Tqr1; implementation uses dm; $R *.DFM 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 12 页,共 1
37、3 页 - - - - - - - - - end. unit about; interface uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, Buttons, ExtCtrls; type TAboutBox = class(TForm) Panel1: TPanel; ProgramIcon: TImage; ProductName: TLabel; Version: TLabel; Copyright: TLabel; Comments: TLabel; OKButton: TButton; private Private declarations public Public declarations end; var AboutBox: TAboutBox; implementation $R *.dfm end. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 13 页,共 13 页 - - - - - - - - -
限制150内