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

📄 ypdj.pas

📁 实现人力资源的管理
💻 PAS
📖 第 1 页 / 共 2 页
字号:
   end;

   application.MessageBox('保存成功','提示',64);
   editclear;
   close;
except
   application.MessageBox('保存失败','提示',64);
end;
end;

procedure Typdjfrm.SpeedButton5Click(Sender: TObject);
begin
if messagebox(self.Handle,'真的要删除吗?','提示',mb_yesno+mb_iconquestion)=idyes then
   data.ADOQuery1.Delete;
end;

procedure Typdjfrm.SpeedButton7Click(Sender: TObject);
begin
editclear;
end;

procedure Typdjfrm.SpeedButton6Click(Sender: TObject);
begin
close;
end;

procedure Typdjfrm.FormCreate(Sender: TObject);
begin
if mainfrm.log=1 then
begin
if data.ypdj.FieldByName('编号').Value<>null then
   begin
      ComboBox2.Clear;
      ComboBox3.Clear;
      editvalue;
      SpeedButton3.Visible:=true;
      SpeedButton2.Visible:=true;
      SpeedButton5.Visible:=true;
      SpeedButton1.Visible:=false;
      SpeedButton4.Visible:=false;
      SpeedButton7.Visible:=false;
      SpeedButton3.Left:=ypdjfrm.SpeedButton1.Left;
      SpeedButton2.Left:=ypdjfrm.SpeedButton4.Left;
      SpeedButton5.Left:=ypdjfrm.SpeedButton7.Left;
      SpeedButton3.Top:=ypdjfrm.SpeedButton1.Top;
      SpeedButton2.Top:=ypdjfrm.SpeedButton4.Top;
      SpeedButton5.Top:=ypdjfrm.SpeedButton7.Top;
   end;
end;
end;

procedure Typdjfrm.Edit1Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit2Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'') then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit3Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit4Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit5Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit6Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit7Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit8Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit9Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Memo1Change(Sender: TObject);
begin
if (edit1.Text<>'') and (edit2.Text<>'') and (combobox1.Text<>'') and
(combobox2.Text<>'') and (memo1.Text<>'') and (edit3.Text<>'') and
(edit4.Text<>'') and (edit5.Text<>'') and (edit6.Text<>'') and
(edit7.Text<>'') and (edit8.Text<>'') and (edit9.Text<>'') and (combobox1.Text<>'')then
SpeedButton4.Enabled:=true;
end;

procedure Typdjfrm.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if (Key = vk_Return) or(Key = vk_Down) then
    Edit2.SetFocus;
end;

procedure Typdjfrm.Edit2KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   combobox1.SetFocus
else
   if Key = vk_Up then
    Edit1.SetFocus;
end;

procedure Typdjfrm.Edit3KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit4.SetFocus
else
   if Key = vk_Up then
    maskedit1.SetFocus;
end;

procedure Typdjfrm.Edit4KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit5.SetFocus
else
   if Key = vk_Up then
    edit3.SetFocus;
end;

procedure Typdjfrm.Edit5KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit6.SetFocus
else
   if Key = vk_Up then
    edit4.SetFocus;
end;

procedure Typdjfrm.Edit6KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit7.SetFocus
else
   if Key = vk_Up then
    edit5.SetFocus;
end;

procedure Typdjfrm.Edit7KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit8.SetFocus
else
   if Key = vk_Up then
    edit6.SetFocus;
end;

procedure Typdjfrm.Edit8KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit9.SetFocus
else
   if Key = vk_Up then
    edit7.SetFocus;
end;

procedure Typdjfrm.Edit9KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   combobox3.SetFocus
else
   if Key = vk_Up then
    edit8.SetFocus;
end;

procedure Typdjfrm.ComboBox1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key = vk_Return then
   combobox2.SetFocus
else
   if Key = vk_Up then
    edit2.SetFocus;
end;

procedure Typdjfrm.ComboBox2KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key = vk_Return then
   maskedit1.SetFocus
else
   if Key = vk_Up then
    combobox1.SetFocus;
end;

procedure Typdjfrm.ComboBox3KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key = vk_Return then
   memo1.SetFocus
else
   if Key = vk_Up then
    edit9.SetFocus;
end;

procedure Typdjfrm.MaskEdit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
   edit3.SetFocus
else
   if Key = vk_Up then
    combobox2.SetFocus;
end;

procedure Typdjfrm.Memo1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key = vk_Down then
   memo2.SetFocus
else
   if Key = vk_Up then
    combobox3.SetFocus;
end;
procedure Typdjfrm.Memo2KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if mainfrm.log=1 then
begin
if ((Key = vk_Return) or(Key = vk_Down)) then
    if Key = vk_Up then
   memo1.SetFocus
end
else
begin
if speedbutton4.Enabled=true then
   if Key = vk_Down then
      if Key = vk_Up then
         memo1.SetFocus;
end;
end;


end.

⌨️ 快捷键说明

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