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

📄 syylbxunit.pas

📁 工资管理系统
💻 PAS
字号:
unit SYYLBXUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Grids, DBGrids, Db, DBTables;

type
  TForm1 = class(TForm)
    Table1: TTable;
    DataSource1: TDataSource;
    Table2: TTable;
    DataSource2: TDataSource;
    DBGrid1: TDBGrid;
    DBGrid2: TDBGrid;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var cod:string;
begin
table1.first;
with table1 do
begin
table2.first;
while not eof do
begin
cod:=fieldbyname('code').asstring;
if table2.locate('工号',cod,[]) then
begin
     Edit;
     FieldByName('kk_yl').asfloat:=table2.fieldbyname('n7').asfloat*3;
     FieldByName('kk_qt1').asfloat:=table2.fieldbyname('n8').asfloat*3;
     if (fieldbyname('bz_gw').asfloat<>0) and(fieldbyname('kk_yl').asfloat<=32.6*3) then
     FieldByName('kk_yl').asfloat:=32.6*3;
     if (fieldbyname('bz_gw').asfloat<>0) and(fieldbyname('kk_qt1').asfloat<=6*3) then
     FieldByName('kk_qt1').asfloat:=6*3;
     post;


end;
next;
end;
end;
end;

end.

⌨️ 快捷键说明

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