📄 parasetup.~pas
字号:
unit parasetup;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TFlatRadioButtonUnit, TFlatGroupBoxUnit, StdCtrls,
TFlatEditUnit, ExtCtrls, ActnList;
type
Tparasetup_form = class(TForm)
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
FlatEdit1: TFlatEdit;
FlatEdit2: TFlatEdit;
FlatEdit5: TFlatEdit;
FlatGroupBox1: TFlatGroupBox;
FlatRadioButton1: TFlatRadioButton;
FlatRadioButton2: TFlatRadioButton;
FlatGroupBox2: TFlatGroupBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
FlatRadioButton3: TFlatRadioButton;
FlatRadioButton4: TFlatRadioButton;
FlatEdit6: TFlatEdit;
FlatEdit7: TFlatEdit;
FlatEdit8: TFlatEdit;
FlatEdit9: TFlatEdit;
FlatGroupBox3: TFlatGroupBox;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
FlatEdit10: TFlatEdit;
FlatEdit11: TFlatEdit;
FlatEdit3: TFlatEdit;
FlatEdit4: TFlatEdit;
ActionList1: TActionList;
Exit_but: TAction;
procedure FormCreate(Sender: TObject);
procedure Exit_butExecute(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
parasetup_form: Tparasetup_form;
implementation
uses datashare;
{$R *.dfm}
procedure Tparasetup_form.FormCreate(Sender: TObject);
var
Str:string;
i:integer;
begin
inherited;
for i:=0 to componentcount-1 do
begin
if components[i] is TFlatEdit then
begin
(components[i] as TFlatEdit).Text:='';
(components[i] as TFlatEdit).ReadOnly:=true;
end;
end;
try
with datashare_form.Query1 do
begin
close;
sql.Clear;
Str:='select * from SCOIPARASETUP'; //检索社保参数表中是否有记录
sql.Add(Str);
prepare;
open;
FlatEdit1.Text:=fieldbyname('BEGINYEAR').AsString;
FlatEdit2.Text:=fieldbyname('BEGINMONTH').AsString;
FlatEdit3.Text:=fieldbyname('ENDYEAR').AsString;
FlatEdit4.Text:=fieldbyname('ENDMONTH').AsString;
FlatEdit5.Text:=FormatFloat('#,##0.00',fieldbyname('AVAGPAY').AsFloat);
if fieldbyname('PAYREFER').AsString='0' then
begin
FlatRadiobutton1.Checked:=true;
FlatRadiobutton2.Enabled:=false;
end
else
begin
FlatRadioButton2.Checked:=true;
FlatRadioButton1.Enabled:=false;
end;
if fieldbyname('MODESTAT').AsString='0' then
begin //按比例
FlatRadioButton3.Checked:=true;
FlatEdit6.Text:=FormatFloat('#,##0.00',fieldbyname('TOPVALUE').AsFloat*100)+'%';
FlatEdit7.Text:=FormatFloat('#,##0.00',fieldbyname('BUTVALUE').AsFloat*100)+'%';
FlatEdit8.Enabled:=false;
FlatEdit9.Enabled:=false;
//label12.Visible:=false;
//label13.Visible:=false;
FlatRadioButton4.Enabled:=false;
end
else
begin //按绝对值
FlatRadioButton4.Checked:=true;
FlatEdit9.Text:=FormatFloat('#,##0.00',fieldbyname('TOPVALUE').AsFloat);
FlatEdit8.Text:=FormatFloat('#,##0.00',fieldbyname('BUTVALUE').AsFloat);
FlatEdit6.Enabled:=false;
FlatEdit7.Enabled:=false;
//label8.Visible:=false;
//label9.Visible:=false;
// label10.Visible:=false;
//label11.Visible:=false;
FlatRadioButton3.Enabled:=false;
end;
FlatEdit10.Text:=FormatFloat('#,##0.00',fieldbyname('PERSON').AsFloat*100)+'%';
FlatEdit11.Text:=FormatFloat('#,##0.00',fieldbyname('UNITVALUE').AsFloat*100)+'%';
close;
end;
except
on e:exception do
application.MessageBox(pchar(e.Message),'恩普软件',MB_OK+MB_IconStop+MB_SystemModal);
end;
end;
procedure Tparasetup_form.Exit_butExecute(Sender: TObject);
begin
//退出当前模块
if Application.MessageBox('您真的要退出当前模块操作吗?','退出确认',MB_OKCancel+MB_DEFBUTTON1+MB_IconQuestion+MB_SystemModal)=IdOk then
close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -