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

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
IBQFurloughs.SQL.Clear;
IBQFurloughs.SQL.Append('select * from Furloughs');
IBQFurloughs.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQFurloughs.SQL.Append('Order By DateOrder');
IBQFurloughs.Open;
IBQAwards.SQL.Clear;
IBQAwards.SQL.Append('select * from Awards');
IB QAwards.SQL .Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQAwards.SQL.Append('Order By DateDocum');
IBQAwards.Open;
end;
end;
procedure TFEmployers.FormClose(Sender: TObject; var Action: TCloseAction);
begin
with DM do begin
IBQMilitary.Close;
IBQEmployers.Close;
IBQJobTitles.Close;
FSelect.Enabled:=True;
end;
end;
procedure AddEmployer;
begin
EditEmployers.EmployerAdd:=True;
EditEmployers.FirstRun:=True;
FEmployers.Enabled:=False;
FEditEmployers.Show;
end;
procedure EditEmployer;
begin
with DM do
if IBQEmployers.RecordCount>0 then begin
IBQJobTitles.Locate('ID',IBQEmployersJobTitle.AsInteger,[loCaseInsensitive]);
EditEmployers.EmployerAdd:=False;
EditEmployers.FirstRun:=True;
FEmployers.Enabled:=F alse;
InitSQL;
FEditEmployers.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteEmployer;
var RecSave:LongInt;
begin
with DM do
if IBQEmployers.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить сотрудника:
'+Trim(IBQEmployersFamily.AsString)+'?'),",ID_OK)=ID_OK then begin
if IBQEmployers.RecordCount>1 then RecSave:=IBQEmployers.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Family');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from ChangeFIO');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from BookWorks');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Qualifications');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Formations');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Furloughs');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from MotionEmployers');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from IncQualifics');
IBQExecSQL.SQL.Append('where
Empl oyers='+IntToStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Military');
IBQExecSQL.SQL.Append('where ID='+IntToStr(IBQEmployersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Employers');
IB QExec S QL .S QL .Append('where ID='+IntT oStr(IB QEmpl oyersID.AsInteger));
IBQExecSQL.ExecSQL;
IBQEmployers.Close;
IBQEmployers.Open;
IB QEmpl oyers.RecNo:=Rec Save;
end;
end else Application.MessageBox('HeT данных для
удаления','Сообщение',МВ_ОК);
end;
procedure EmployerFound;
begin
with DM do FoundEmployers.RecSave:=IBQEmployersID.AsInteger;
FEmployers.Enabled:=False;
FFoundEmployers.Show;
end;
procedure TFEmployers.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
VK_F2: AddEmployer;
VK_F4: EditEmployer;
VK_F7: EmployerFound;
VK_F8: DeleteEmployer;
VK_ESCAPE: FEmployers.Close;
end;
end;
procedure TFEmployers.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2)-6;
end;
end.
unit EditQualifications;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ComCtrls, DB;
type
TFEditQualifications = class(TForm)
LabelDateOrder: TLabel;
LabelDate: TLabel;
LabelNumberProtocol: TLabel;
LabelDecision: TLabel;
LabelNumberOrder: TLabel;
LabelProfession: TLabel;
LabelCategoryShort: TLabel;
SBEditWorkBooks: TStatusBar;
DTPOrder: TDateTimePicker;
DTPDate: TDateTimePicker;
EditNumberOrder: TEdit;
EditDecision: TEdit;
EditCategory: TEdit;
EditCategoryShort: TEdit;
EditNumberProtocol: TEdit;
PanelQualification: TPanel;
Lab elDateProtocol: TLab el;
DTPProtocol: TDateTimePicker;
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
FEditQualifications: TFEditQualifications;
QualificationAdd:Boolean;
implementation
uses EditEmployers, DataModule;
{$R *.dfm}
procedure TFEditQualifications.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do
if QualificationAdd then begin
DTPDate.DateTime:=Trunc(Date());
EditDecision.Text:='';
EditC ategory .Text:-';
EditC ategoryShort.Text:='';
EditNumberProtocol.Text:='';
DTPProtocol.DateTime:=Trunc(Date());
EditNumberOrder.T ext:='';
DTPOrder.DateTime:=Trunc(Date());
end else begin
DTPDate.DateTime:=IBQQualificationsDates.AsDateTime;
EditDecision.Text:=Trim(IBQQualificationsDecision.AsString);
EditCategory.Text:=Trim(IBQQualificationsCategory.AsString);
EditCategoryShort.Text:=Trim(IBQQualificationsCategoryShort.AsString);
EditNumberProtocol.Text:=Trim(IBQQualificationsNumberProtocol.AsString);
DTPProtocol.DateTime:=IBQQualificationsDateProtocol.AsDateTime;
EditNumberOrder.Text:=Trim(IBQQualificationsNumberOrder.AsString);
DTPOrder.DateTime:=IBQQualificationsDateOrder.AsDateTime;
end;
DTPDate.SetFocus;
end;
procedure TFEditQualifications.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
procedure TFEditQualifications.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
begin
with DM do
case key of
13: begin
if QualificationAdd then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_Qualifications,0) from Qualifications');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into Qualifications (Employers,');
IBQExecSQL.SQL.Append('Dates,');
IBQExecSQL.SQL.Append('Decision,');
IBQExecSQL.SQL.Append('Category,');
IBQExecSQL.SQL.Append('CategoryShort,');
IBQExecSQL.SQL.Append('NumberProtocol,');
IBQExecSQL SQL.Append('DateProtocol,');
IBQExecSQL.SQL.Append('NumberOrder,');
IBQExecSQL.SQL.Append('DateOrder)');
IBQExecSQL.SQL.Append('Values
('+IntToStr(IB QEmpl oyersID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPDate.Date)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditDecision.Text)+char(39)+',');
IB QExecSQL .SQL.Append(chr(39)+Trim(EditC ategory .T ext)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditCategoryShort.Text)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditNumberProtocol.Text)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPProtocol.Date)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditNumberOrder.Text)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPOrder.Date)+char(39)+')');
end else begin
RecSave:=IBQQualificationsID.AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update Qualifications');
IBQExecSQL.SQL.Append('Set
Dates='+chr(39)+DateToStr(DTPDate.Date)+char(39)+',');
IBQExecSQL.SQL.Append('Decision='+chr(39)+Trim(EditDecision.Text)+char(39)+',');
IBQExecSQL.SQL.Append('Category='+chr(39)+Trim(EditCategory.Text)+char(39)+',');
IBQExecSQL.SQL.Append('CategoryShort='+chr(39)+Trim(EditCategoryShort.Text)+char(3
9)+',');
IBQExecSQL.SQL.Append('NumberProtocol='+chr(39)+Trim(EditNumberProtocol.Text)+ch
ar(39)+',');
IBQExecSQL.SQL.Append('DateProtocol='+chr(39)+DateToStr(DTPProtocol.Date)+char(39
)+',');
IBQExecSQL.SQL.Append('NumberOrder='+chr(39)+Trim(EditNumberOrder.Text)+char(39
)+',');
IBQExecSQL.SQL.Append('DateOrder='+chr(39)+DateToStr(DTPOrder.Date)+char(39));
IBQExecSQL.SQL.Append('where ID='+IntToStr(RecSave));
end;
IBQExecSQL.ExecSQL;
IBQQualifications.Close;
IBQQualifications.Open;
IBQQualifications.Locate('ID',RecSave,[loCaseInsensitive]);
FEditQualifications.Close;
end;
27: FEditQualifications.Close;
end;
end;
unit EditMotions;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Mask, DBCtrls, ComCtrls, StdCtrls, ExtCtrls, DB;
type
TFEditMotions = class(TForm)
PanelMotion: TPanel;
SBEditMotion: TStatusBar;
LabelDateOrder: TLabel;
LabelNumberOrder: TLabel;
EditOrder: TEdit;
DTPOrder: TDateTimePicker;
DBEditjobTitle: TDBEdit;
LabelJobTitle: TLabel;
DTPBegin: TDateTimePicker;
LabelBegin: TLabel;
DTPEnd: TDateTimePicker;
CBPedagogs: TCheckBox;
CBUnceasing: TCheckBox;
CBDateEnd: TCheckBox;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure CBDateEndClick(Sender: TObject);
procedure DBEditjobTitleEnter(Sender: TObject);
procedure DBEditjobTitleExit(Sender: TObject);
procedure DBEditjobTitleKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FEditMotions: TFEditMotions;
MotionAdd,First:Boolean;
RecS aveJ obTitle: LongInt;
implementation
uses DataModule, EditEmployers, JobTitles;
{$R *.dfm}
procedure TFEditMotions.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do begin
if First then begin
DTPEnd.Date:=Trunc(Date);
if MotionAdd then begin
DTPOrder.Date:=Trunc(Date());
EditOrder.Text:-';
DTPBegin.Date:=Trunc(Date());
DTPEnd.Date:=Trunc(Date());
CBPedagogs.Checked:=F alse;
CBUnceasing.Checked:=False;
CBDateEnd.Checked:=True;
end else begin
DTPOrder.Date:=Trunc(IBQMotionEmployersDateOrder.AsDateTime);
EditOrder.Text:=Trim(IBQMotionEmployersOrderNumber.AsString);
DTPBegin.Date:=Trunc(IBQMotionEmployersDateFrom.AsDateTime);
if IBQMotionEmployersDateTo.AsDateTime=0 then begin
CBDateEnd.Checked:=False;
DTPEnd.Visible:=False;
end else begin
CBDateEnd.Checked:=T rue;
DTPEnd.Visible:=True;
DTPEnd.Date:=Trunc(IBQMotionEmployersDateTo.AsDateTime);
end;
if IBQMotionEmployersPedagogs.AsInteger=1 then CBPedagogs.Checked:=True
else CBPedagogs.Checked:=False;
end;
DTPOrder.SetFocus;
First:=False;
end;
end;
end;
procedure TFEditMotions.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
procedure TFEditMotions.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
begin
with DM do
case key of
13: begin
if MotionAdd then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_MotionEmployers,0) from
MotionEmployers');
IBQID.Open;
RecSave:=IBQIDGen_ID. AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into MotionEmployers (Employers,');
IBQExecSQL.SQL.Append('JobTitle,');
IBQExecSQL.SQL.Append('DateOrder,');
IBQExecSQL.SQL.Append('OrderNumber,');
IBQExecSQL.SQL.Append('DateFrom,');
IBQExecSQL.SQL.Append('DateTo,');
IBQExecSQL.SQL.Append('Pedagogs,');
IBQExecSQL.SQL.Append('Unceasing)');
IBQExecSQL.SQL.Append('Values ('+IntToStr(IBQEmployersID.AsInteger)+',');
IBQExecSQL.SQL.Append(IntToStr(IBQJobTitlesID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPOrder.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditOrder.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
if CBDateEnd.Checked=False then DTPEnd.DateTime:=0;
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
if CBPedagogs.Checked then IBQExecSQL.SQL.Append('1,')
else IBQExecSQL.SQL.Append('0,');
if CBUnceasing.Checked then IBQExecSQL.SQL.Append('1)')
else IBQExecSQL.SQL.Append('0)');
end else begin
RecSave:=IB QMoti onEmpl oyersID. AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update MotionEmployers');
IBQExecSQL.SQL.Append('Set JobTitle='+IntToStr(IBQJobTitlesID.AsInteger)+',');
IBQExecSQL.SQL.Append('DateOrder='+chr(39)+DateToStr(DTPOrder.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('OrderNumber='+chr(39)+Trim(EditOrder.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('DateFrom='+chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
if CBDateEnd.Checked=False then DTPEnd.DateTime:=0;
IBQExecSQL.SQL.Append('DateTo='+chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
if CBPedagogs.Checked then IBQExecSQL.SQL.Append('Pedagogs=1,')
else IBQExecSQL.SQL.Append('Pedagogs=0,');
if CBUnceasing.Checked then IBQExecSQL.SQL.Append('Unceasing=1')
else IBQExecSQL.SQL.Append('Unceasing=0');
IBQExecSQL.SQL.Append('where ID='+IntToStr(RecSave));
end;
IB QExec S QL ExecSQL;
IBQMotionEmployers.Close;
IB QMoti onEmpl oy ers.Open;
IBQMotionEmployers.Locate('ID',RecSave,[loCaseInsensitive]);
if IBQMotionEmployers.RecNo<IBQMotionEmployers.RecordCount then
IBQJobTitles.Locate('ID',RecSaveJobTitle,[loCaseInsensitive]);
FEditMotions.Close;
end;
27: FEditMotions.Close;
end;
end;
procedure TFEditMotions.CBDateEndClick(Sender: TObject);
begin
if CBDateEnd.Checked then DTPEnd.Visible:=True
else DTPEnd.Visible:=False;
end;
procedure TFEditMotions.DBEditjobTitleEnter(Sender: TObject);
begin
SBEditMotion.SimpleText:='-H3MeHmb -OTMeHa F4-Bbi6op профессии';
end;
procedure TFEditMotions.DBEditjobTitleExit(Sender: TObject);
begin
SBEditMotion.SimpleText:='-H3MeHmb -OTMeHa';
end;
procedure TFEditMotions.DBEditjobTitleKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
with DM do
if key=VK_F4 then begin
FEditMotions.Enabled:=False;
JobTitles.RecSave:=IBQJobTitlesID.AsInteger;
JobTitles.SelectJobTitle:=4;
FJobTitles.Show;
end;
end;
end.
unit EditJobTitles;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls, DB;
type
TFEditJobTitles = class(TForm)
PanelEditJobTitles: TPanel;
SBEditJobTitles: TStatusBar;
LabelJobTitle: TLabel;
EditJobTitles: TEdit;
procedure FormActivate(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var

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

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