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

經典案例 財務管理系統(10)[4]

2022-06-13   來源: Delphi編程 

  //顯示統計結果

  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;

  //啟用新帳戶

  procedure TAccountSettingBitBtnClick(Sender: TObject);

  begin

  //判斷是否試算平衡

  adoqueryClose;

  adoquerySQLClear;

  adoquerySQLAdd(select sum(累計借方) 借方sum(累計貸方) 貸方 from 帳簿初始化表);

  adoqueryOpen;

  if adoqueryFieldByName(借方)AsString<>adoqueryFieldByName(貸方)AsString then

  begin

  showmessage(新帳簿初始化不平衡請檢查試算平衡表後重新輸入);

  exit;

  end;

[]  []  []  []  []  


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