財(cái)務(wù)管理系統(tǒng)附程序源代碼.doc_第1頁(yè)
財(cái)務(wù)管理系統(tǒng)附程序源代碼.doc_第2頁(yè)
財(cái)務(wù)管理系統(tǒng)附程序源代碼.doc_第3頁(yè)
財(cái)務(wù)管理系統(tǒng)附程序源代碼.doc_第4頁(yè)
財(cái)務(wù)管理系統(tǒng)附程序源代碼.doc_第5頁(yè)
已閱讀5頁(yè),還剩8頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

附程序源代碼: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 *.resbegin Application.Initialize; logo:=tlogo.Create(application); logo.Show; logo.Update; Application.CreateForm(Tdm2, dm2); Application.CreateForm(Tdenglu, denglu); sleep(1000); logo.Hide; logo.Free; Application.Run;end.unit logosrc;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, jpeg, ExtCtrls;type Tlogo = class(TForm) Image1: TImage; private Private declarations public Public declarations end;var logo: Tlogo;implementation$R *.dfmend.unit login;interfaceuses Windows, Messages, SysUtils, Variants, 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 BitBtn1Click(Sender: TObject); private Private declarations public Public declarations end;var denglu: Tdenglu;implementation uses dm,main;$R *.dfmprocedure Tdenglu.BitBtn2Click(Sender: 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 with 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;interfaceuses 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; StatusBar1: 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; N16: TMenuItem; N17: TMenuItem; N18: TMenuItem; DataSource1: TDataSource; ActionList1: TActionList; DataSetFirst1: TDataSetFirst; DataSetPrior1: TDataSetPrior; DataSetNext1: TDataSetNext; DataSetLast1: TDataSetLast; DataSetInsert1: TDataSetInsert; DataSetDelete1: TDataSetDelete; DataSetEdit1: TDataSetEdit; DataSetPost1: TDataSetPost; Panel1: TPanel; Panel2: TPanel; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; DBEdit1: TDBEdit; DBEdit2: TDBEdit; DBEdit9: 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: TBitBtn; 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: TLabel; Label60: TLabel; ComboBox3: TComboBox; Edit3: TEdit; BitBtn18: TBitBtn; BitBtn19: TBitBtn; BitBtn21: TBitBtn; Timer1: TTimer; Label6: TLabel; DBEdit3: TDBEdit; Panel5: TPanel; Label7: TLabel; 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; SpeedButton1: 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: 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 FormActivate(Sender: TObject); procedure BitBtn14Click(Sender: TObject); procedure BitBtn15Click(Sender: TObject); procedure BitBtn13Click(Sender: TObject); procedure BitBtn17Click(Sender: TObject); procedure 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 public Public declarations end;var Form1: TForm1;implementation uses about,dm,report,login;$R *.dfmprocedure TForm1.N9Click(Sender: TObject);begin tabsheet2.Show;end;procedure TForm1.N10Click(Sender: TObject);begin tabsheet3.Show;end;procedure TForm1.N12Click(Sender: TObject);begin tabsheet5.Show;end;procedure TForm1.N8Click(Sender: TObject);begin tabsheet1.Show;end;procedure TForm1.N14Click(Sender: TObject);begin application.Terminate ;end;procedure TForm1.N5Click(Sender: 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);var iCount: Integer; /將從數(shù)據(jù)模塊中取得的數(shù)據(jù)庫(kù)表的字段名填入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; /向下移動(dòng)到下一個(gè)字段 end; sender.ItemIndex := 0; /設(shè)置表單剛出現(xiàn)時(shí)ComboBox的值為第一個(gè)end;procedure TForm1.search(f1:tcombobox;t1:tedit); /自定義過程search(在數(shù)據(jù)庫(kù)中搜尋指定條件的數(shù)據(jù))var SearchField: string; /要查找的字段名 SearchValue: string; /要查找的字段值begin SearchField := Trim(f1.Text); /將ComboBox的值賦給SearchField SearchValue := % + Trim(t1.Text) + %; /將Edit的值賦給SearchField with DM2.ADOQuery1 do begin close; /先關(guān)閉數(shù)據(jù)模塊中的ADOQuery sql.Clear; /清空ADOQuery中的SQL值 sql.Add(select * from xmb where + SearchField + like + SearchValue + ); /進(jìn)行數(shù)據(jù)查詢的SQL語句(SearchFidel和SearchValue / 分別賦到SQL語句中 end; Dm2.ADOQuery1.Open; /打開數(shù)據(jù)模塊中的ADOQueryend;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);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(你確信要?jiǎng)h除記錄?,mtwarning,mbok,mbcancel,0)=mrok then DM2.ADOQuery1.Delete;end;procedure TForm1.BitBtn17Click(Sender: TObject);begin dispall;end;procedure TForm1.BitBtn21Click(Sender: TObject);begin with tqr1.Create(self) do Preview;end;procedure TForm1.Timer1Timer(Sender: TObject);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: TObject);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;interfaceuses SysUtils, Classes, ADODB, DB;type Tdm2 = class(TDataModule) ADOConnection1: TADOConnection; ADOQuery1: TADOQuery; ADOQuery1DSDesigner: TWideStringField; ADOQuery1DSDesigner2: TBCDField; ADOQuery1DSDesigner3: TBCDField; ADOQuery1DSDesigner4: TDateTimeField; ADOQuery1DSDesigner5: TWideStringField; ADOQuery1total: TCurrencyField; ADOTable1: TADOTable; procedure ADOQuery1CalcFields(DataSet: TDataSet); private Private declarations public Public declarations end;var dm2: Tdm2;implementation$R *.dfmprocedure Tdm2.ADOQuery1CalcFields(DataSet: TDataSet);begin adoquery1total.Value :=ADOQuery1DSDesigner2.Value - ADOQuery1DSDesigner3.value ;end;end.unit report;interfaceuses Windows, SysUtils, Messages, Classes, Graphics, Controls, StdCtrls, ExtCtrls, Forms, QuickRpt, QRCtrls, DB, ADODB;type Tqr1 = class(TQuickRep) ColumnHeaderBand1: TQRBand; TitleBand1: TQRBand; QRLabel1: TQRLabel; DetailBand1: TQRBand;

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論