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

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
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
VK_F2: AddFormation;
VK_F4: EditFormation;
VK_F8: DeleteFormation;
end;
end;
procedure AddQualification;
begin
with DM do begin
EditQualifications.QualificationAdd:=True;
FEditEmployers.Enabled:=False;
FEditQualifications.Show;
end;
end;
procedure EditQualification;
begin
with DM do
if IBQQualifications.RecordCount>0 then begin
EditQualifications.QualificationAdd:=False;
FEditEmployers.Enabled:=False;
FEditQualifications.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteQualification;
var RecSave:LongInt;
begin
with DM do
if IBQQualifications.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить аттестацию от:
'+DateToStr(IBQQualificationsDates.AsDateTime)+'?'),M,ID_OK)=ID_OK then begin
if IBQQualifications.RecordCount>1 then RecSave:=IBQQualifications.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Qualifications');
IBQExecSQL.SQL.Append('where ID='+IntToStr(IBQQualificationsID.AsInteger));
IBQExecSQL.ExecSQL;
IBQQualifications.Close;
IBQQualifications.Open;
IBQQualifications.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGQualificationKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddQualification;
VK_F4: EditQualification;
VK_F8: DeleteQualification;
end;
end;
procedure AddlncQualific;
begin
with DM do begin
EditIncQualifics.AddIncQualific:=T rue;
FEditEmployers.Enabled:=False;
FEditIncQualifics.Show;
end;
end;
procedure EditIncQualific;
begin
with DM do
if IBQIncQualifics.RecordCount>0 then begin
EditIncQualifics.AddIncQualific:=False;
FEditEmployers.Enabled:=False;
FEditIncQualifics.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteIncQualific;
var RecSave:LongInt;
begin
with DM do
if IBQIncQualifics.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить повышение квалификации от:
'+DateToStr(IBQIncQualificsDateOrder.AsDateTime)+'?'),",ID_OK)=ID_OK then begin
if IBQIncQualifics.RecordCount>1 then RecSave:=IBQIncQualifics.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from IncQualifics');
IBQExecSQL.SQL.Append('where ID-+IntToStr(IBQIncQualificsID.AsInteger));
IBQExecSQL.ExecSQL;
IBQIncQualifics.Close;
IBQIncQualifics.Open;
IBQIncQualifics.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGIncQualificsKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddIncQualific;
VK_F4: EditIncQualific;
VK_F8: DeleteIncQualific;
end;
end;
procedure AddFurlough;
begin
with DM do begin
EditF urloughs. AddF url ough:=True;
FEditEmployers.Enabled:=False;
FEditFurloughs.Show;
end;
end;
procedure EditFurlough;
begin
with DM do
if IBQFurloughs.RecordCount>0 then begin
EditFurloughs. AddFurlough:=False;
FEditEmployers.Enabled:=False;
FEditFurloughs.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteFurlough;
var RecSave:LongInt;
begin
with DM do
if IBQFurloughs.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить отпуск от:
'+DateToStr(IBQFurloughsDateOrder.AsDateTime)+'?'),'',ID_OK)=ID_OK then begin
if IBQFurloughs.RecordCount>1 then RecSave:=IBQFurloughs.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Furloughs');
IB QExec S QL .S QL .Append('where ID='+IntTo Str(IB QFurloughsID. AsInteger));
IBQExecSQL.ExecSQL;
IBQFurloughs.Close;
IBQFurloughs.Open;
IBQFurloughs.RecNo:=RecSave;
end;
end else Application.MessageBox('HeT данных для удаления','Сообщение',МВ_ОК);
end;
procedure TFEditEmployers.DBGFurloughsKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddFurlough;
VK_F4: EditFurlough;
VK_F8: DeleteFurlough;
end;
end;
procedure AddAward;
begin
with DM do begin
EditAwards.AddAward :=True;
FEditEmployers.Enabled:=False;
FEditAwards.Show;
end;
end;
procedure EditAward;
begin
with DM do
if IBQAwards.RecordCount>0 then begin
EditAwards.AddAward :=False;
FEditEmployers.Enabled:=False;
FEditAwards.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteAward;
var RecSave:LongInt;
begin
with DM do
if IBQAwards.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить награждение:
'+Trim(IBQAwardsAward.AsString)+'?'),",ID_OK)=ID_OK then begin
if IBQAwards.RecordCount>1 then RecSave:=IBQAwards.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Awards');
IB QExec S QL S QL Append('where ID='+IntTo Str(IB QAwardsID.AsInteger));
IBQExecSQL.ExecSQL;
IBQAwards.Close;
IBQAwards.Open;
IBQAwards.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGrAwardKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
VK_F2: AddAward;
VK_F4: EditAward;
VK_F8: DeleteAward;
end;
end;
end.
unit EditChangesFIO;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, StdCtrls, DB;
type
TFEditChangesFIO = class(TForm)
EditFamilyNew: TEdit;
LabelFamilyNew: TLabel;
PanelEditChangeFIO: TPanel;
DTPChange: TDateTimePicker;
LabelDates: TLabel;
LabelName: TLabel;
EditNameNew: TEdit;
LabelFathers: TLabel;
EditFathersNew: TEdit;
EditBasis: TEdit;
LabelBasis: TLabel;
LabelNote: TLabel;
EditNote: TEdit;
SBEditchangeFIO: TStatusBar;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FEditChangesFIO: TFEditChangesFIO;
ChangeFIOAdd:Boolean;
implementation
uses DataModule, EditEmployers;
{$R *.dfm}
procedure TFEditChangesFIO.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do
if ChangeFIOAdd then begin
DTPChange.Date:=Trunc(Date());
EditFamilyNew.Text:='';
EditNameNew.Text:='';
EditFathersNew.Text:='';
EditBasis.Text:-';
EditNote.Text:='';
end else begin

Смотрите также:

"Автоматизация обработки заявок ООО "Проектно-Строительная Компания"
"Автоматизация процесса аттестации персонала для ООО "Нэт Бай Нэт Холдинг"
"Анализ интернет-активности конкурентов ( на примере конкурентов "Газпром нефть")
"Бухгалтерский учёт и аудит расчётов с подотчётними лицами в организации на примере ООО "ЛОЦ 10""
«Психологическое сопровождение персонала в организации на примере ООО «Крокус»
Cовершенствование деловой оценки персонала в организации (на примере ООО "Даймонд кейтеринг развитие")
IPO - инструмент финансирования деятельности организации. На примере ПАО «Нефтяная компания «Лукойл»
PR как средство продвижения организации (на примере ПАО "Тамбовский завод "Комсомолец им. Н.С. Артемова")
PR-коммуникации в сфере общественного питания (на примере кафе-кондитерской «Cream Cheese»)
SMM как средство повышения эффективности работы учреждений социокультурной сферы (на примере Малого театра)