熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Delphi編程 >> 正文

經典案例 財務管理系統(13)[3]

2013-11-23 17:44:09  來源: Delphi編程 

  //對數據進行統計

  procedure TSumAccountsumtable;

  var

  counti:integer;

  valvalvalvalvalval:double;

  begin

  //計算平衡表中的記錄數

  count:=datasourceDataSetRecordCount;

  //統計信息判斷是否試算平衡

  val:=;

  val:=;

  val:=;

  val:=;

  val:=;

  val:=;

  while not datasourceDataSetEof do

  begin

  val:=strtofloat(dbgridFields[]Text)+val;

  val:=strtofloat(dbgridFields[]Text)+val;

  val:=strtofloat(dbgridFields[]Text)+val;

  val:=strtofloat(dbgridFields[]Text)+val;

  val:=strtofloat(dbgridFields[]Text)+val;

  val:=strtofloat(dbgridFields[]Text)+val;

  datasourceDataSetNext;

  end;

  //顯示統計結果

  stringgridCells[]:=是否平衡;

  stringgridCells[]:=floattostr(val);

  stringgridCells[]:=floattostr(val);

  stringgridCells[]:=floattostr(val);

  stringgridCells[]:=floattostr(val);

  stringgridCells[]:=floattostr(val);

  stringgridCells[]:=floattostr(val);

  if (val<>val)or(val<>val)or(val<>val) then

  begin

  stringgridCells[]:=不平衡;

  stringgridFontColor:=clred;

  end

  else

  stringgridCells[]:=平衡;

  end;

  //

  //以下是帳戶設置窗體的代碼

  implementation

  {$R *dfm}

  uses sumaccountform;

  procedure TAccountSettingFormClose(Sender: TObject;

  var Action: TCloseAction);

  begin

  action:=cafree;

  end;

  //設置表格

  procedure TAccountSettingDataSourceDataChange(Sender: TObject;

  Field: TField);

  begin

  //設置帳簿初始化表列寬

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  end;

  procedure TAccountSettingDataSourceDataChange(Sender: TObjectField: TField);

  begin

  //設置系統參數表列寬

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  dbgridColumns[]Width:=;

  end;

  //初始化帳戶

  procedure TAccountSettingBitBtnClick(Sender: TObject);

  begin

  //執行儲存過程初始化帳戶

  adocommandCommandText:=EXEC sf_初始化帳戶;

  if applicationMessageBox(是否清除原帳簿信息並初始化新帳簿?確認

  MB_OKCANCEL)=IDOK then

  adocommandExecute;

  //刷新數據表

  adotableActive:=false;

  adotableActive:=true;

  adotableActive:=false;

  adotableActive:=true;

  end;

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/Delphi/201311/24972.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.