📄 xygdj.pas
字号:
combobox8.Clear;
combobox9.Clear;
xygdjfrm.Caption:='员工信息修改';
ygxxllfrm.editvalue;
SpeedButton2.Enabled:=false;
SpeedButton5.Enabled:=false;
SpeedButton4.Enabled:=true;
end;
if mainfrm.log=2 then
begin
SpeedButton2.Click;
Edit2.Text:=ypdjfrm.edit2.Text;
ComboBox1.Text:=ypdjfrm.combobox1.Text;
ComboBox2.Text:=ypdjfrm.ComboBox2.Text;
ComboBox4.Text:=ypdjfrm.combobox3.Text;
MaskEdit1.Text:=ypdjfrm.maskedit1.Text;
Edit6.Text:=ypdjfrm.edit4.Text;
Edit3.Text:=ypdjfrm.edit8.Text;
Edit4.Text:=ypdjfrm.edit9.Text;
Edit5.Text:=ypdjfrm.edit5.Text;
end;
end;
procedure Txygdjfrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if mainfrm.log=2 then
mainfrm.log:=0;
end;
procedure Txygdjfrm.SpeedButton3Click(Sender: TObject);
begin
try
with data.ADOQYygxx do
begin
close;
sql.Clear;
sql.Add('insert 人事表 values (:a,:b,:c,:d,:e,:f,:g,:h,:i,:j,:k,:l,:m,:n,:o,:p,:q,:r,:s,:t,:u,:v,:w,:x,:y,:z,:aa,:ab,:ac,:ad,:ae,:af)');
parameters.ParamByName('a').Value:=trim(edit1.Text);
parameters.ParamByName('b').Value:=trim(edit2.Text);
parameters.ParamByName('c').Value:=trim(combobox1.Text);
parameters.ParamByName('d').Value:=trim(edit9.Text);
parameters.ParamByName('e').Value:=strtodate(maskedit1.Text);
parameters.ParamByName('f').Value:=trim(combobox2.Text);
parameters.ParamByName('g').Value:=trim(combobox3.Text);
parameters.ParamByName('h').Value:=trim(combobox5.Text);
parameters.ParamByName('i').Value:=trim(edit8.Text);
parameters.ParamByName('j').Value:=maskedit2.Text;
parameters.ParamByName('k').Value:=trim(edit7.Text);
parameters.ParamByName('l').Value:=trim(edit6.Text);
parameters.ParamByName('m').Value:=trim(edit10.Text);
parameters.ParamByName('n').Value:=trim(edit3.Text);
parameters.ParamByName('o').Value:=trim(edit4.Text);
parameters.ParamByName('p').Value:=trim(combobox4.Text);
parameters.ParamByName('q').Value:=trim(edit5.Text);
parameters.ParamByName('r').Value:=trim(maskedit3.Text);
parameters.ParamByName('s').Value:=strtoint(edit11.Text);
parameters.ParamByName('t').Assign(image1.Picture.Bitmap);
parameters.ParamByName('u').Value:=trim(combobox7.Text);
parameters.ParamByName('v').Value:=trim(combobox2.Text);
parameters.ParamByName('w').Value:=trim(combobox8.Text);
parameters.ParamByName('x').Value:=trim(combobox9.Text);
parameters.ParamByName('y').Value:=strtodate(maskedit4.Text);
parameters.ParamByName('z').Value:=memo1.Text;
parameters.ParamByName('aa').Value:=strtodate(maskedit5.Text);
parameters.ParamByName('ab').Value:=trim(edit12.Text);
parameters.ParamByName('ac').Value:='否';
parameters.ParamByName('ad').Value:=null;
parameters.ParamByName('ae').Value:=null;
parameters.ParamByName('af').Value:=null;
execsql;
end;
editclear;
application.MessageBox('保存成功!','提示',64);
close;
if mainfrm.log=2 then
ypxxllfrm.SpeedButton2.OnClick(sender);
except
application.MessageBox('系统出错!','提示',64);
end;
end;
procedure Txygdjfrm.SpeedButton4Click(Sender: TObject);
begin
if messagebox(self.Handle,'确定要修改吗?','提示',mb_yesno+mb_iconquestion)= idyes then
begin
try
with data.ADOQuery1 do
begin
edit;
fieldbyname('编号').Value:=trim(edit1.Text);
fieldbyname('姓名').Value:=trim(edit2.Text);
fieldbyname('民族').Value:=trim(combobox2.Text);
fieldbyname('性别').Value:=trim(combobox1.Text);
fieldbyname('出生日期').Value:=trim(maskedit1.Text);
fieldbyname('婚姻状况').Value:=trim(combobox3.Text);
fieldbyname('文化程度').Value:=trim(combobox4.Text);
fieldbyname('政治面貌').Value:=trim(combobox5.Text);
fieldbyname('毕业学校').Value:=trim(edit3.Text);
fieldbyname('专业').Value:=trim(edit4.Text);
fieldbyname('特长').Value:=trim(edit5.Text);
fieldbyname('电子邮箱').Value:=trim(edit6.Text);
fieldbyname('联系电话').Value:=trim(maskedit2.Text);
fieldbyname('手机号码').Value:=trim(edit7.Text);
fieldbyname('籍贯').Value:=trim(edit8.Text);
fieldbyname('身份证号').Value:=trim(edit9.Text);
fieldbyname('家庭地址').Value:=trim(edit10.Text);
fieldbyname('参加工作时间').Value:=trim(maskedit3.Text);
fieldbyname('工种').Value:=trim(combobox6.Text);
fieldbyname('工龄').Value:=trim(edit11.Text);
fieldbyname('所属部门').Value:=trim(combobox7.Text);
fieldbyname('职务').Value:=trim(combobox8.Text);
fieldbyname('职称').Value:=trim(combobox9.Text);
fieldbyname('登记日期').Value:=trim(maskedit5.Text);
fieldbyname('登记人').Value:=trim(edit12.Text);
fieldbyname('调入时间').Value:=trim(maskedit4.Text);
fieldbyname('简历').Value:=trim(memo1.Text);
fieldbyname('照片').Assign(image1.Picture.Bitmap);
post;
end;
application.MessageBox('修改成功','提示',64);
except
application.MessageBox('修改失败','提示',64);
end;
close;
end;
end;
procedure Txygdjfrm.SpeedButton5Click(Sender: TObject);
begin
editclear;
end;
procedure Txygdjfrm.SpeedButton6Click(Sender: TObject);
begin
close;
end;
procedure Txygdjfrm.Edit1Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit2Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.ComboBox1Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.ComboBox2Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.MaskEdit1Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.ComboBox3Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.ComboBox4Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.ComboBox5Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit3Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit4Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit5Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit6Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.MaskEdit2Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit7Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit8Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
procedure Txygdjfrm.Edit9Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
if length(trim(edit9.Text))=19 then
begin
maskedit1.Text:=copy(trim(edit9.Text),8,4)+'-'+copy(trim(edit9.Text),12,2)+'-'+copy(trim(edit9.Text),14,2);
end
else
if length(trim(edit9.Text))=15 then
begin
maskedit1.Text:='19'+copy(trim(edit9.Text),9,2)+'-'+copy(trim(edit9.Text),11,2)+'-'+copy(trim(edit9.Text),13,2);
end;
end;
procedure Txygdjfrm.Edit10Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (edit8.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit7.Text<>'') and (edit9.Text<>'') and
(edit10.Text<>'') and (edit6.Text<>'') and (edit11.Text<>'') and (edit12.Text<>'') and
(combobox2.Text<>'') and (combobox5.Text<>'') and (combobox6.Text<>'') and (combobox7.Text<>'') and
(combobox8.Text<>'') and (combobox9.Text<>'') and (combobox3.Text<>'') and (combobox1.Text<>'') and
(combobox4.Text<>'') and (combobox2.Text<>'') and (maskedit4.Text<>'') and (maskedit5.Text<>'') and
(maskedit1.Text<>'') and (maskedit2.Text<>'') and (maskedit3.Text<>'') then
SpeedButton3.Enabled:=true
else
SpeedButton3.Enabled:=false;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -