📄 inessiscontinue.pas
字号:
unit InEssisContinue;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BASEWIN, XPMenu, Menus, ActnList, ImgList, TFlatButtonUnit,
ExtCtrls, Grids, DBGrids, StdCtrls, Mask, ToolEdit, TFlatComboBoxUnit,
TFlatEditUnit, TFlatGroupBoxUnit, DB, RxMemDS;
type
TInEssisContinue_frm = class(Tbasewin_frm)
FlatGroupBox1: TFlatGroupBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label9: TLabel;
Label13: TLabel;
Label17: TLabel;
Label19: TLabel;
Label20: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label11: TLabel;
Label5: TLabel;
Label12: TLabel;
Label14: TLabel;
FlatEdit1: TFlatEdit;
FlatEdit2: TFlatEdit;
FlatEdit3: TFlatEdit;
FlatEdit7: TFlatEdit;
FlatComboBox1: TFlatComboBox;
FlatComboBox5: TFlatComboBox;
FlatEdit5: TFlatEdit;
FlatEdit4: TFlatEdit;
FlatEdit6: TFlatEdit;
FlatComboBox2: TFlatComboBox;
DateEdit2: TDateEdit;
DateEdit3: TDateEdit;
FlatComboBox3: TFlatComboBox;
FlatComboBox4: TFlatComboBox;
DateEdit1: TDateEdit;
GroupBox2: TGroupBox;
DBGrid1: TDBGrid;
GroupBox1: TGroupBox;
Label1: TLabel;
DateEdit4: TDateEdit;
Label10: TLabel;
FlatEdit8: TFlatEdit;
Label15: TLabel;
FlatEdit12: TFlatEdit;
Label16: TLabel;
FlatEdit13: TFlatEdit;
Label18: TLabel;
FlatEdit16: TFlatEdit;
Label21: TLabel;
FlatEdit15: TFlatEdit;
Label22: TLabel;
FlatComboBox6: TFlatComboBox;
Label23: TLabel;
Label24: TLabel;
FlatEdit9: TFlatEdit;
FlatEdit10: TFlatEdit;
Panel2: TPanel;
Panel3: TPanel;
FlatButton1: TFlatButton;
FlatButton2: TFlatButton;
FlatComboBox7: TFlatComboBox;
FlatButton5: TFlatButton;
RMD: TRxMemoryData;
RMDiscode: TStringField;
RMDpsname: TStringField;
RMDpsseno: TIntegerField;
RMDyearno: TIntegerField;
RMDcpsum: TFloatField;
RMDcymonths: TIntegerField;
RMDcypj: TFloatField;
DataSource1: TDataSource;
Label26: TLabel;
FlatEdit11: TFlatEdit;
Label27: TLabel;
FlatEdit14: TFlatEdit;
Label25: TLabel;
FlatEdit17: TFlatEdit;
procedure FormCreate(Sender: TObject);
procedure FlatButton2Click(Sender: TObject);
procedure DBGrid1KeyPress(Sender: TObject; var Key: Char);
procedure RMDNewRecord(DataSet: TDataSet);
procedure FlatButton1Click(Sender: TObject);
procedure FlatButton5Click(Sender: TObject);
private
{ Private declarations }
procedure init;
procedure SaveInfo;
procedure Save_sbdu_pswgcase;
procedure Save_sbdz_InEsiis;
function Validate_Data : boolean;
public
{ Public declarations }
end;
var
InEssisContinue_frm: TInEssisContinue_frm;
implementation
uses datashare, Main, onlinelogin;
{$R *.dfm}
procedure TInEssisContinue_frm.init ;
begin
Dateedit1.Date :=0;
Dateedit2.Date :=0;
dateedit3.Date :=0;
Dateedit4.Date :=0;
FlatEdit1.Text :='';
FlatEdit2.Text :='';
FlatEdit3.Text :='';
FlatEdit4.Text :='';
FlatEdit5.Text :='';
FlatEdit6.Text :='';
FlatEdit7.Text :='';
FlatEdit8.Text :='';
FlatEdit9.Text :='';
FlatEdit10.Text :='';
Flatedit11.Text :='';
Flatedit12.Text :='';
Flatedit13.Text :='';
Flatedit14.Text :='';
FlatEdit15.Text :='';
FlatEdit16.Text :='';
FlatEdit17.Text :='';
FlatComboBox1.ItemIndex :=-1;
FlatComboBox2.ItemIndex :=-1;
FlatComboBox3.ItemIndex :=-1;
FlatComboBox4.ItemIndex :=-1;
FlatComboBox5.ItemIndex :=-1;
FlatComboBox6.ItemIndex :=-1;
FlatComboBox1.Text :='';
FlatComboBox2.Text :='';
FlatComboBox3.Text :='';
FlatComboBox4.Text :='';
FlatComboBox5.Text :='';
FlatComboBox6.Text :='';
RMD.Close ;
RMD.Open ;
end;
procedure TInEssisContinue_frm.SaveInfo ;
begin
with DataShare_frm.Query3 do
begin
close;
sql.Clear ;
sql.Add('insert into sbdb_psarch(psseno,psname,sex,bdate,iscode,identity,tel,');
sql.Add('address,zip,wkdate,wkattr,status,joindate,household,notes,cpseno) values(');
sql.Add(':p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16)');
parambyname('p1').AsString :=flatedit1.Text ;
parambyname('p2').AsString :=flatedit2.Text ;
parambyname('p3').AsInteger :=Flatcombobox1.ItemIndex ;
parambyname('p4').AsDateTime :=dateedit1.Date ;
parambyname('p5').AsString :=flatedit3.Text ;
parambyname('p6').AsInteger :=FlatCombobox2.ItemIndex+1;
parambyname('p7').AsString :=flatedit4.Text ;
parambyname('p8').AsString :=flatedit5.Text ;
parambyname('p9').AsString :=flatedit6.Text ;
parambyname('p10').AsDateTime :=dateedit2.Date ;
parambyname('p11').AsInteger :=Flatcombobox3.ItemIndex ;
parambyname('p12').AsInteger :=Flatcombobox4.ItemIndex+1;
parambyname('p13').AsDateTime :=dateedit3.Date ;
parambyname('p14').AsInteger :=Flatcombobox5.ItemIndex ;
parambyname('p15').AsString :=flatedit7.Text ;
parambyname('p16').AsString :=Flatcombobox7.Items[flatcombobox6.itemindex];
prepare;
execsql;
end;
{sql.Add('select agcardno,psname,sex,nacode,bdate,iscode,identity,wkdate,wkattr,household,status,joindate,notes from sbdb_psarch ');
sql.Add(' where psseno=:param') ;
ParamByName('param').AsString:=Flatcombobox2.Items[Flatcombobox1.itemindex];
prepare;
open;
Flatedit1.Text :=Fieldbyname('agcardno').AsString ; Flatedit2.Text :=Fieldbyname('psname').AsString ;
if trim(Fieldbyname('sex').AsString)='0' then Flatedit3.Text :='女' else Flatedit3.Text:='男' ; //[0 女 1男]
if trim(Fieldbyname('identity').AsString)='1' then Flatedit12.Text:='企业长期和合同工(一年以上)' //1企业长期和合同工(一年以上)2企业短期合同工(一年以下)3个体工商户4自由职业者5机关事业职工6机关事业职工参加企业7军转文职参加企业9其他
else if trim(Fieldbyname('identity').AsString)='2' then Flatedit12.Text:='企业短期合同工(一年以下)'
else if trim(Fieldbyname('identity').AsString)='3' then Flatedit12.Text:='个体工商户'
else if trim(Fieldbyname('identity').AsString)='4' then Flatedit12.Text:='自由职业者'
else if trim(Fieldbyname('identity').AsString)='5' then Flatedit12.Text:='机关事业职工'
else if trim(Fieldbyname('identity').AsString)='6' then Flatedit12.Text:='机关事业职工参加企业'
else if trim(Fieldbyname('identity').AsString)='7' then Flatedit12.Text:='军转文职参加企业'
else if trim(Fieldbyname('identity').AsString)='9' then Flatedit12.Text:='其他' ;
if trim(Fieldbyname('wkattr').AsString)='0' then Flatedit8.Text :='固定工' //[0 固定工.1 合同工.2 临时工.3 农民工]
else if trim(Fieldbyname('wkattr').AsString)='1' then Flatedit8.Text :='合同工'
else if trim(Fieldbyname('wkattr').AsString)='2' then Flatedit8.Text :='临时工'
else if trim(Fieldbyname('wkattr').AsString)='3' then Flatedit8.Text :='农民工';
if trim(Fieldbyname('household').AsString)='0' then Flatedit9.Text :='城镇' //[0 城镇.1 农村]
else Flatedit9.Text :='农村';
if trim(Fieldbyname('status').AsString)='1' then Flatedit13.Text :='在保' //[1在保.2中断.3终止.4离退休退职.5异地转出.6工伤退休.7工伤转正常退休.8养老死亡.9工伤死亡]
else if trim(Fieldbyname('status').AsString)='2' then Flatedit13.Text:='中断'
else if trim(Fieldbyname('status').AsString)='3' then Flatedit13.Text:='终止'
else if trim(Fieldbyname('status').AsString)='4' then Flatedit13.Text:='离退休退职'
else if trim(Fieldbyname('status').AsString)='5' then Flatedit13.Text:='异地转出'
else if trim(Fieldbyname('status').AsString)='6' then Flatedit13.Text:='工伤退休'
else if trim(Fieldbyname('status').AsString)='7' then Flatedit13.Text:='工伤转正常退休'
else if trim(Fieldbyname('status').AsString)='8' then Flatedit13.Text:='养老死亡'
else if trim(Fieldbyname('status').AsString)='9' then Flatedit13.Text:='工伤死亡';
//Flatedit4.Text :=Fieldbyname('nacode').AsString ;
Flatedit5.Text :=Fieldbyname('bdate').AsString ; Flatedit6.Text :=Fieldbyname('iscode').AsString ;
//20040802
//Flatedit7.Text :=Fieldbyname('wkdate').AsString ;
//Flatedit10.Text:=Fieldbyname('joindate').AsString ;
if not Fieldbyname('wkdate').IsNull then
DateEdit1.Date :=Fieldbyname('wkdate').AsDateTime ;
if not Fieldbyname('joindate').IsNull then
DateEdit2.Date :=Fieldbyname('joindate').AsDateTime ;
date_change:=false;
//20040802
Flatedit11.Text:=Fieldbyname('notes').AsString ; }
end;
function TInEssisContinue_frm.Validate_Data :boolean;
var
i:double;
j:integer;
list:Tstrings;
begin
result:=true;
(*if trim(flatedit1.Text)='' then
begin
application.MessageBox('人员内码不能为空,请生成人员内码!','恩普软件',mb_iconerror+mb_ok);
FlatButton5.SetFocus ;
Result:=false;
exit;
end; *)
if trim(flatedit2.Text)='' then
begin
application.MessageBox('人员姓名不能为空!','恩普软件',mb_iconerror+mb_ok);
flatedit2.SetFocus ;
Result:=false;
exit;
end;
if trim(flatedit3.Text)='' then
begin
application.MessageBox('人员身份证号码不能为空!','恩普软件',mb_iconerror+mb_ok);
flatedit3.SetFocus;
Result:=false;
exit;
end;
if trim(flatedit4.Text)='' then
begin
application.MessageBox('人员联系电话不能为空!','恩普软件',mb_iconerror+mb_ok);
flatedit4.SetFocus;
Result:=false;
exit;
end;
if trim(flatedit5.Text)='' then
begin
application.MessageBox('人员联系地址不能为空!','恩普软件',mb_iconerror+mb_ok);
flatedit5.SetFocus;
Result:=false;
exit;
end;
if trim(flatedit6.Text)='' then
begin
application.MessageBox('人员邮编不能为空!','恩普软件',mb_iconerror+mb_ok);
flatedit6.SetFocus;
Result:=false;
exit;
end;
if trim(flatedit8.Text)='' then flatedit8.Text :='0';
if trim(flatedit9.Text)='' then flatedit9.Text :='0';
if trim(flatedit10.Text)='' then flatedit10.Text :='0';
if trim(flatedit11.Text)='' then flatedit11.Text :='0';
if trim(flatedit12.Text)='' then flatedit12.Text :='0';
if trim(flatedit13.Text)='' then flatedit13.Text :='0';
if trim(flatedit14.Text)='' then flatedit14.Text :='0';
if trim(flatedit15.Text)='' then flatedit15.Text :='0';
if trim(flatedit16.Text)='' then flatedit16.Text :='0';
if trim(flatedit17.Text)='' then flatedit17.Text :='0';
if not trystrtofloat(flatedit8.Text,i) then
begin
application.MessageBox('输入的转入总额非法!','恩普软件',mb_iconerror+mb_ok);
flatedit8.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit9.Text,i) then
begin
application.MessageBox('输入的调整总额非法!','恩普软件',mb_iconerror+mb_ok);
flatedit9.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit10.Text,i) then
begin
application.MessageBox('输入的调整总额个人部份非法!','恩普软件',mb_iconerror+mb_ok);
flatedit10.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit11.Text,i) then
begin
application.MessageBox('输入的调整总额个人部份非法!','恩普软件',mb_iconerror+mb_ok);
flatedit11.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit12.Text,i) then
begin
application.MessageBox('输入的转入上年末累计储存额非法!','恩普软件',mb_iconerror+mb_ok);
flatedit12.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit13.Text,i) then
begin
application.MessageBox('输入的转入上年末累计储存额个人部分非法!','恩普软件',mb_iconerror+mb_ok);
flatedit13.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit14.Text,i) then
begin
application.MessageBox('输入的转入上年末累计储存额单位部分非法!','恩普软件',mb_iconerror+mb_ok);
flatedit14.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit15.Text,i) then
begin
application.MessageBox('输入的转入后缴费基数非法!','恩普软件',mb_iconerror+mb_ok);
flatedit15.SetFocus ;
result:=false;
exit;
end;
if not trystrtofloat(flatedit16.Text,i) then
begin
application.MessageBox('输入的转入当年转入前缴费基数非法!','恩普软件',mb_iconerror+mb_ok);
flatedit16.SetFocus ;
result:=false;
exit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -