Дипломная работа: Автоматизация управления кадрами в Местной администрации городского округа Нальчик

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
end;
procedure DeleteMotion;
var RecSave:LongInt;
begin
with DM do
if IBQMotionEmployers.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить движение сотрудника от:
'+DateToStr(IBQMotionEmployersDateFrom.AsDateTime)+' в должности:
'+Trim(IBQMotionEmployersNameJobTitle.AsString)+'?'),'',ID_OK)=ID_OK then begin
if IBQMotionEmployers.RecordCount>1 then RecSave:=IBQMotionEmployers.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from MotionEmployers');
IB QExec S QL .S QL .Append('where ID='+IntTo Str(IB QMoti onEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQMotionEmployers.Close;
IBQMotionEmployers.Open;
IBQMotionEmployers.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGMotionKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
VK_F2: AddMotion;
VK_F4: EditMotion;
VK_F8: DeleteMotion;
end;
end;
procedure TFEditEmployers.DBGMotionEnter(Sender: TObject);
begin
SBEditEmployers.SimpleText:='F2-Добавить F4-Изменить F5-Печать F8-Удалить
<Enter>-Ввод -Отмена';
end;
procedure TFEditEmployers.DBGMotionExit(Sender: TObject);
begin
SBEditEmployers.SimpleText:='F3-Фото F5-Печать er>-Изменить -Отмена';
end;
procedure TFEditEmployers.DBGrFormationExit(Sender: TObject);
begin
SBEditEmployers.SimpleText:='F5-Печать <Enter>-Изменить -Отмена';
end;
procedure TFEditEmployers.CBMilitaryClick(Sender: TObject);
begin
if CBMilitary.Checked then InitMilitary(True)
else InitMilitary(False);
end;
procedure TFEditEmployers.DBEditJ obTitleKeyDown(Sender: T Object;
var Key: Word; Shift: TShiftState);
begin
with DM do
if key=VK_F4 then begin
FEmployers.Enabled:=False;
JobTitles.RecSave:=IBQJobTitlesID.AsInteger;
JobTitles.SelectJobTitle:=3;
FJobTitles.Show;
end;
end;
procedure AddFamily;
begin
with DM do begin
EditFamilys.FamilyAdd:=True;
FEditEmployers.Enabled:=False;
FEditFamilys.Show;
end;
end;
procedure EditsFamily;
begin
with DM do
if IBQFamily.RecordCount>0 then begin
EditFamilys.FamilyAdd:=False;
FEditEmployers.Enabled:=False;
FEditF amilys.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteFamily;
var RecSave:LongInt;
begin
with DM do
if IBQFamily.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить родственника:
'+Trim(IBQFamilyFamilys.AsString)+'?'),'',ID_OK)=ID_OK then begin
if IBQFamily.RecordCount>1 then RecSave:=IBQFamily.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Family');
IBQExecSQL.SQL.Append('where ID='+IntToStr(IBQFamilyID.AsInteger));
IBQExecSQL.ExecSQL;
IBQFamily.Close;
IBQFamily.Open;
IBQFamily.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
procedure TFEditEmployers.DBGFamilyKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
VK_F2: AddFamily;
VK_F4: EditsFamily;
VK_F8: DeleteFamily;
end;
end;
procedure AddChangeFIO;
begin
with DM do begin
EditChangesFIO.ChangeFIOAdd:=True;
FEditEmployers.Enabled:=False;
FEditChangesFIO.Show;
end;
end;
procedure EditChangeFIO;
begin
with DM do
if IBQChangeFIO.RecordCount>0 then begin
EditChangesFIO.ChangeFIOAdd:=False;
FEditEmployers.Enabled:=False;
FEditChangesFIO.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteChangeFIO;
var RecSave:LongInt;
begin
with DM do
if IBQChangeFIO.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить изменение Ф.И.О:
'+Trim(IBQChangeFIOFamilyNew.AsString)+'
'+Trim(IBQChangeFIONameNew.AsString)+'
'+Trim(IBQChangeFIOFathersNew.AsString)+'?'),",ID_OK)=ID_OK then begin
if IBQChangeFIO.RecordCount>1 then RecSave:=IBQChangeFIO.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from ChangeFIO');
IBQExecSQL.SQL.Append('where ID-+IntToStr(IBQChangeFIOID.AsInteger));
IBQExecSQL.ExecSQL;
IBQChangeFIO.Close;
IBQChangeFIO.Open;
IBQChangeFIO.RecNo:=RecSave;
end;
end else Application.MessageBox('HeT данных для удаления','Сообщение',МВ_ОК);
procedure TFEditEmployers.DBGrChangeFIOKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddChangeFIO;
VK_F4: EditChangeFIO;
VK_F8: DeleteChangeFIO;
end;
end;
procedure AddWorkBook;
begin
with DM do begin
EditB ookW orks.BookW orkAdd:=True;
FEditEmployers.Enabled:=False;
FEditBookWorks.Show;
end;
end;
procedure EditWorkBook;
begin
with DM do
if IBQBookWorks.RecordCount>0 then begin
EditB ookWorks.B ookWorkAdd:=False;
FEditEmployers.Enabled:=False;
FEditBookWorks.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteWorkBook;
var RecSave:LongInt;
begin
with DM do
if IBQBookWorks.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить запись по организации:
'+Trim(IBQBookWorksEnterPrises.AsString)+' на должности:
'+Trim(IBQBookWorksJobTitle.AsString)+'?'),'',ID_OK)=ID_OK then begin
if IBQBookWorks.RecordCount>1 then RecSave:=IBQBookWorks.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from BookWorks');
IB QExec S QL S QL Append('where ID='+IntTo Str(IB QB ookWorksID.AsInteger));
IBQExecSQL.ExecSQL;
IBQBookWorks.Close;
IBQBookWorks.Open;
IBQBookWorks.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGrBookWorksKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddWorkBook;
VK_F4: EditWorkBook;
VK_F8: DeleteWorkBook;
end;
end;
procedure AddFormation;
begin
with DM do begin
EditFormations.FormationAdd:=True;
FEditEmployers.Enabled:=False;
FEditFormations.Show;
end;
end;
procedure EditFormation;
begin
with DM do
if IBQFormations.RecordCount>0 then begin
EditFormations.FormationAdd:=False;
FEditEmployers.Enabled:=False;
FEditFormations.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteFormation;
var RecSave:LongInt;
begin
with DM do
if IBQFormations.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить профессия:
'+Trim(IBQFormationsProfession.AsString)+' образовательное учреждение:
'+Trim(IBQFormationsInstitution.AsString)+'?'),'',ID_OK)=ID_OK then begin
if IBQFormations.RecordCount>1 then RecSave:=IBQFormations.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Formations');
IB QExec S QL .S QL .Append('where ID='+IntTo Str(IB QFormationsID. AsInteger));
IBQExecSQL.ExecSQL;
IBQFormations.Close;
IBQFormations.Open;
IBQFormations.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGrFormationKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
Источник: https://baza.diplomsite.ru/previewfile/2244