《2022年财务管理系统及财务知识分析程序.docx》由会员分享,可在线阅读,更多相关《2022年财务管理系统及财务知识分析程序.docx(33页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选学习资料 - - - - - - - - - 财务治理系统应用程序设计本程序设计的是一个小型商店每天记的流水帐治理程序,没有具 体到销售的每一样商品, 只是记载了每一笔的收入和支出情形;经过 简洁扩充就可以成为一个完整的商店销售治理系统;下面来说一下本 程序的各个模块的功能及数据库的结构;一、本程序由封面、登录界面、主窗口、打印窗口及关于窗口五 部分组成;主窗口又由增加记录、编辑记录、查询信息、打印数据、治理功能组成;封面:在启动主程序之前显示一个软件封面,停留大约二秒钟,用于说明本软件的功能版本信息,排除用户等待主程序启动的焦虑(一般用于主程序启动需要较长时间的软件中)登录界面: 登录界
2、面产生一个用户的下拉列表,用户可挑选相应 的用户名称,输入对应的密码进入,挑选“ 取消” 终止程序运行;防 止用户以外的人看到密码,密码输入框内的密码用“ ” 屏蔽;主窗口:主窗口是本软件的核心, 百分之九十的功能代码都在这 里实现;主窗口上方是一组下拉菜单, 实现功能的切换和数据的处理;下面一组标签页实现相应的功能; 最下方的状态条显示当前的时间和 日期;打印窗口: 实现所要打印的数据输出之前的预览,可以通过上面 的一排功能按钮调整预览成效;关于窗口:一个小对话框,显示的是本软件的说明信息;名师归纳总结 - - - - - - -第 1 页,共 17 页精选学习资料 - - - - - -
3、- - - 添加记录:该标签页由上面的一组数据明细和下面的掌握按钮组成,输入框前的文本提示输入框内储备的内容,输入框内是我们要输入的数据信息, 下方的“ 第一条” ,“ 上一条” ,“ 下一条” ,“ 最终一条”用于浏览数据,右下方的两个按钮用于数据的添加和储备;编辑记录:该标签页和“ 添加记录” 很相像,增加了一个“ 删除 记录” 按钮和“ 修改记录” 按钮;删除记录前会有一个删除确认对话 框显现,防止用户误删数据;查询信息: 由上面的一组查询组件和下面的数据表格组成;第一 在下拉框中挑选要查询的字段, 然后在右边的文本框内输入要查询的 内容,单击“ 查询” 按钮即可在下面的数据表格中显示所
4、需要的信息;支持模糊查询,可以只输入查询信息的一部分;单击“ 全部” 按钮将 显示全部记录;打印数据:界面和“ 查询信息” 标签相像,增加了一个“ 打印数 据” 按钮;这样,既可以打印全部信息,又可以只打印查询出来的信 息,所打印的数据就是下方数据表格中的数据;治理功能: 包括用户治理和系统初始化功能;用户治理我们可以增加和删除用户,修改用户登录口令;初始化功能将清空数据表;二、数据库的结构设计 本程序用到了两个数据表, 一个是记的流水帐表, 另一个是用户表,全部存在于一个ACCESS2000 数据库中( XMJL.MDB );下面来说明一下数据表的数据结构名师归纳总结 - - - - - -
5、 -第 2 页,共 17 页精选学习资料 - - - - - - - - - XMB 表字段名类型长度序号文本10 收入货币自动支出货币自动日期日期/时间自动经手人8 文本合计货币/运算自动New 表字段名类型长度Us 文本50 文本Ps 50 程序结构图软件封面登录界面程序主界面录入模块修改模块查询模块打印模块治理模块打印名师归纳总结 - - - - - - -第 3 页,共 17 页精选学习资料 - - - - - - - - - 程序流程图:用户身份 验证数据录入数据修改主程序用户治理New 初始化数据库数据查询打印数据XMB 数据库附程序源代码:program xmjl; uses F
6、orms, 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; 名师归纳总结 - - - - - - -第 4 页,共 17 页精选学习资料 - - - - - - - - - logo:=tlogo.
7、Createapplication; logo.Show; logo.Update; Application.CreateFormTdm2, dm2; Application.CreateFormTdenglu, denglu; sleep1000; logo.Hide; logo.Free; Application.Run; end. unit logosrc; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, jpeg, ExtCtrls; t
8、ype Tlogo = classTForm Image1: TImage; private Private declarations public Public declarations end; var logo: Tlogo; implementation $R *.dfm end. unit login; interface uses 名师归纳总结 - - - - - - -第 5 页,共 17 页精选学习资料 - - - - - - - - - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Fo
9、rms, Dialogs, StdCtrls, Mask, Buttons; type Tdenglu = classTForm BitBtn1: TBitBtn; BitBtn2: TBitBtn; ComboBox1: TComboBox; MaskEdit1: TMaskEdit; Label1: TLabel; Label2: TLabel; procedure BitBtn2ClickSender: TObject; procedure FormCreateSender: TObject; procedure BitBtn1ClickSender: TObject; private
10、Private declarations public Public declarations end; var denglu: Tdenglu; implementation uses dm,main; $R *.dfm procedure Tdenglu.BitBtn2ClickSender: TObject; begin application.Terminate; end; procedure Tdenglu.FormCreateSender: TObject; begin with dm2.ADOTable1 do begin open; first; while not eof d
11、o begin combobox1.Items.Addfields0.Value ; next; end; combobox1.ItemIndex :=0; 名师归纳总结 - - - - - - -第 6 页,共 17 页精选学习资料 - - - - - - - - - end; end; procedure Tdenglu.BitBtn1ClickSender: TObject; begin with dm2.ADOTable1 do begin if locateus,combobox1.Text, then begin if maskedit1.text=fields1.Value th
12、en begin hide; with tform1.Createself do showmodal; end; application.Terminate ; end; end; end; end. unit main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ToolWin, Menus, DBActns, ActnList, DB, ExtCtrls, StdCtrls, Mask, DBCtrls, ImgLi
13、st, Buttons, Grids, DBGrids; type TForm1 = classTForm PageControl1: TPageControl; StatusBar1: TStatusBar; TabSheet1: TTabSheet; TabSheet2: TTabSheet; TabSheet3: TTabSheet; TabSheet5: TTabSheet; MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; N4: TMenuItem; N5: TMenuItem; 名师归纳总结 - - - - - - -第 7
14、页,共 17 页精选学习资料 - - - - - - - - - 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: TDataSetPrio
15、r; 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:
16、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;
17、名师归纳总结 - - - - - - -第 8 页,共 17 页精选学习资料 - - - - - - - - - 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: TB
18、itBtn; 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: TLabe
19、l; 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; 名师归纳总结 - - - - - - -第 9 页,共 17 页精选学习资料 - - - - - - - - - Panel6:
20、TPanel; GroupBox1: TGroupBox; SpeedButton1: TSpeedButton; DBGrid2: TDBGrid; DBEdit13: TDBEdit; DBEdit14: TDBEdit; DBNavigator1: TDBNavigator; Label15: TLabel; Label16: TLabel; DataSource2: TDataSource; procedure N9ClickSender: TObject; procedure N10ClickSender: TObject; procedure N12ClickSender: TOb
21、ject; procedure N8ClickSender: TObject; procedure N14ClickSender: TObject; procedure N5ClickSender: TObject; procedure BitBtn5MouseUpSender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; procedure filldatasender:tcombobox; procedure searchf1:tcombobox;t1:tedit; procedure dispall;
22、 procedure FormActivateSender: TObject; procedure BitBtn14ClickSender: TObject; procedure BitBtn15ClickSender: TObject; procedure BitBtn13ClickSender: TObject; procedure BitBtn17ClickSender: TObject; procedure BitBtn21ClickSender: TObject; procedure Timer1TimerSender: TObject; procedure BitBtn11Mous
23、eUpSender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; procedure BitBtn18ClickSender: TObject; procedure SpeedButton1ClickSender: TObject; private Private declarations public Public declarations end; var Form1: TForm1; implementation uses about,dm,report,login; $R *.dfm 名师归纳总结
24、- - - - - - -第 10 页,共 17 页精选学习资料 - - - - - - - - - procedure TForm1.N9ClickSender: TObject; begin tabsheet2.Show; end; procedure TForm1.N10ClickSender: TObject; begin tabsheet3.Show; end; procedure TForm1.N12ClickSender: TObject; begin tabsheet5.Show; end; procedure TForm1.N8ClickSender: TObject; be
25、gin tabsheet1.Show; end; procedure TForm1.N14ClickSender: TObject; begin application.Terminate ; end; procedure TForm1.N5ClickSender: TObject; begin with taboutbox.Createself do ShowModal ; end; procedure TForm1.BitBtn5MouseUpSender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer;
26、begin dbedit1.Text:=inttostrdm2.adoquery1.RecordCount+1; dbedit2.SetFocus; end; procedure TForm1.filldatasender:tcombobox; var iCount: Integer; /将从数据模块中取得的数据库表的字段名填入ComboBox 中begin 名师归纳总结 sender.Items.Clear; /第一清空 ComboBox 中 Items 的值第 11 页,共 17 页- - - - - - -精选学习资料 - - - - - - - - - for iCount := 0
27、to DM2.ADOQuery1.Fields.Count - 2 do begin sender.Items.AddDM2.ADOQuery1.FieldsiCount.FieldName; /加入字段名 DM2.ADOQuery1.Next; /向下移动到下一个字段 end; sender.ItemIndex := 0; /设置表单刚显现时ComboBox 的值为第一个end; procedure TForm1.searchf1:tcombobox;t1:tedit; /自定义过程search在数据库中搜寻指定条件的数据 var SearchField: string; /要查找的字段名
28、SearchValue: string; /要查找的字段值 begin SearchField := Trimf1.Text; SearchValue := % + Trimt1.Text + %; with DM2.ADOQuery1 do begin /将 ComboBox 的值赋给 SearchField /将 Edit 的值赋给 SearchField close; /先关闭数据模块中的 ADOQuery sql.Clear; /清空 ADOQuery 中的 SQL 值 sql.Addselect * from xmb where + SearchField + like + Sear
29、chValue + ; /进行数据查询的SQL 语句( SearchFidel 和 SearchValue / 分别赋到 SQL 语句中 end; Dm2.ADOQuery1.Open; /打开数据模块中的ADOQuery end; procedure TForm1.FormActivateSender: TObject; begin filldatacombobox1; filldatacombobox3; tabsheet1.Show; end; procedure TForm1.BitBtn14ClickSender: TObject; begin searchcombobox1,edi
30、t1; end; procedure TForm1.BitBtn15ClickSender: TObject; begin 名师归纳总结 - - - - - - -第 12 页,共 17 页精选学习资料 - - - - - - - - - dispall; end; procedure TForm1.dispall; begin with dm2.ADOQuery1 do begin close; sql.clear; sql.Addselect * from xmb; open; end; end; procedure TForm1.BitBtn13ClickSender: TObject;
31、 begin if MessageDlg 你确信要删除记录 then DM2.ADOQuery1.Delete; end; .,mtwarning,mbok,mbcancel,0=mrok procedure TForm1.BitBtn17ClickSender: TObject; begin dispall; end; procedure TForm1.BitBtn21ClickSender: TObject; begin with tqr1.Createself do Preview; end; procedure TForm1.Timer1TimerSender: TObject; be
32、gin statusbar1.Panels3.Text :=timetostrnow; statusbar1.Panels4.Text :=formatdatetimeyyyy end; 年 MM 月 dd 日,now; procedure TForm1.BitBtn11MouseUpSender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; begin dbedit12.SetFocus; end; 名师归纳总结 - - - - - - -第 13 页,共 17 页精选学习资料 - - - - - - -
33、 - - procedure TForm1.BitBtn18ClickSender: TObject; begin searchcombobox3,edit3; end; procedure TForm1.SpeedButton1ClickSender: TObject; begin with dm2.ADOQuery1 do begin close; sql.Clear; sql.Adddelete * from xmb; ExecSQL; close; sql.Clear; sql.Addselect * from xmb; open; end; end; end. unit dm; in
34、terface uses SysUtils, Classes, ADODB, DB; type Tdm2 = classTDataModule ADOConnection1: TADOConnection; ADOQuery1: TADOQuery; ADOQuery1DSDesigner: TWideStringField; ADOQuery1DSDesigner2: TBCDField; ADOQuery1DSDesigner3: TBCDField; ADOQuery1DSDesigner4: TDateTimeField; ADOQuery1DSDesigner5: TWideStri
35、ngField; ADOQuery1total: TCurrencyField; ADOTable1: TADOTable; procedure ADOQuery1CalcFieldsDataSet: TDataSet; private 名师归纳总结 - - - - - - -第 14 页,共 17 页精选学习资料 - - - - - - - - - Private declarations public Public declarations end; var dm2: Tdm2; implementation $R *.dfm procedure Tdm2.ADOQuery1CalcFie
36、ldsDataSet: 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; type Tqr1 = classTQuickRep ColumnHead
37、erBand1: TQRBand; TitleBand1: TQRBand; QRLabel1: TQRLabel; DetailBand1: TQRBand; QRLabel2: TQRLabel; QRLabel3: TQRLabel; QRLabel4: TQRLabel; QRLabel5: TQRLabel; QRLabel6: TQRLabel; QRLabel7: TQRLabel; QRDBText1: TQRDBText; QRDBText2: TQRDBText; QRDBText3: TQRDBText; QRDBText4: TQRDBText; QRDBText5:
38、TQRDBText; QRDBText6: TQRDBText; 名师归纳总结 - - - - - - -第 15 页,共 17 页精选学习资料 - - - - - - - - - QRShape1: TQRShape; QRShape2: TQRShape; QRShape3: TQRShape; QRShape7: TQRShape; QRShape8: TQRShape; QRShape9: TQRShape; SummaryBand1: TQRBand; QRSysData1: TQRSysData; QRLabel8: TQRLabel; QRLabel9: TQRLabel; QR
39、SysData2: TQRSysData; QRLabel10: TQRLabel; QRSysData3: TQRSysData; private public end; var qr1: Tqr1; implementation uses dm; $R *.DFM end. unit about; interface uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, Buttons, ExtCtrls; type TAboutBox = classTForm Panel1: TPanel; Progr
40、amIcon: TImage; ProductName: TLabel; Version: TLabel; Copyright: TLabel; Comments: TLabel; OKButton: TButton; private 名师归纳总结 - - - - - - -第 16 页,共 17 页精选学习资料 - - - - - - - - - Private declarations public Public declarations end; var AboutBox: TAboutBox; implementation $R *.dfm end. 名师归纳总结 - - - - - - -第 17 页,共 17 页