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

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
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
Источник: https://baza.diplomsite.ru/previewfile/2244