⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monthmoneytotalunit.pas

📁 人事管理系统帮助人们管理复杂的关系
💻 PAS
字号:
unit MonthMoneyTotalUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TMonthMoneyTotal = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Label3: TLabel;
    Edit2: TEdit;
    Button1: TButton;
    Label4: TLabel;
    Label5: TLabel;
    CBMonth: TComboBox;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MonthMoneyTotal: TMonthMoneyTotal;

implementation

uses DataMUnit;

{$R *.dfm}

procedure TMonthMoneyTotal.Button1Click(Sender: TObject);
begin
  MonthMoneyTotal.Close;
end;

procedure TMonthMoneyTotal.Button2Click(Sender: TObject);
var
  totalmoney,i:integer;
begin
  totalmoney:=0;
  if DataM.ADOGZ.Active = true then
    DataM.ADOGZ.Close;

  DataM.ADOGZ.SQL.Clear;
  DataM.ADOGZ.SQL.Text:=' select * from FGZ Where 工资月份 = ''' + Cbmonth.Text + '''';
  DataM.ADOGZ.Prepared;
  DataM.ADOGZ.Open;

  edit1.Text:=IntToStr(DataM.ADOGZ.RecordCount) + ' 人';

  for i := 1 to DataM.ADOGZ.RecordCount do
    begin
      totalMoney:=totalMoney+StrToInt(DataM.ADOGZ.FieldValues['实际工资']);
      DataM.ADOGZ.Next;
    end;

  edit2.Text := IntToStr(totalMoney)+' 元。';
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -