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

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
FEditJobTitles: TFEditJobTitles;
JobTitleAdd:Boolean;
implementation
uses DataModule, JobTitles;
{$R *.dfm}
procedure TFEditJobTitles.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do
if JobTitleAdd then EditJobTitles.Text:=''
else EditJobTitles.Text:=Trim(IBQJobTitlesJobTitle.AsString);
EditJobTitles.SetFocus;
end;
procedure TFEditJobTitles.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
begin
with DM do
case key of
13: begin
if JobTitleAdd then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_JobTitles,0) from JobTitles');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into JobTitles (JobTitle)');
IBQExecSQL.SQL.Append('Values ('+chr(39)+Trim(EditJobTitles.Text)+chr(39)+')');
end else begin
RecSave:=IBQJobTitlesID. AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append(Update JobTitles');
IBQExecSQL.SQL.Append('Set JobTitle='+chr(39)+Trim(EditJobTitles.Text)+chr(39));
IBQExecSQL.SQL.Append('where ID-+IntToStr(IBQJobTitlesID.AsInteger));
end;
IBQExecSQL.ExecSQL;
IBQJobTitles.Close;
IBQJobTitles.Open;
IBQJobTitles.Locate('ID',RecSave,[loCaseInsensitive]);
FEditJobTitles.Close;
end;
27: FEditJobTitles.Close;
end;
end;
procedure TFEditJobTitles.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FJobTitles.Enabled:=True;
end;
end.
unit EditIncQualifics;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls, DB;
type
TFEditIncQualifics = class(TForm)
PanelIncQualifics: TPanel;
LabelInstitution: TLabel;
EditInstitution: TEdit;
EditTypeQualific: TEdit;
LabelTypeQualific: TLabel;
LabelDocuments: TLabel;
EditDocuments: TEdit;
LaelSerial: TLabel;
EditSerialDoc: TEdit;
DTPOrder: TDateTimePicker;
LabelDateOrder: TLabel;
LabelNumberOrder: TLabel;
LabelDateDocum: TLabel;
DTPDocum: TDateTimePicker;
EditBasis: TEdit;
SBEditIncQualifics: TStatusBar;
LabelBegin: TLabel;
DTPBegin: TDateTimePicker;
LabelEnd: TLabel;
DTPEnd: 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
FEditIncQualifics: TFEditIncQualifics;
AddIncQualific:Boolean;
implementation
uses DataModule, EditEmployers;
{$R *.dfm}
procedure TFEditIncQualifics.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do
if AddIncQualific then begin
DTPBegin.DateTime:=Trunc(Date());
DTPEnd.DateTime:=Trunc(Date());
EditTypeQualific.Text:-';
EditInstitution.Text:='';
EditDocuments.Text:='';
EditSerialDoc.Text:='';
DTPDocum.DateTime:=Trunc(Date());
EditBasis.Text:='';
DTPOrder.DateTime:=Trunc(Date());
end else begin
DTPBegin.DateTime:=Trunc(IBQIncQualificsDateFrom.AsDateTime);
DTPEnd.DateTime:=Trunc(IBQIncQualificsDateTo.AsDateTime);
EditTypeQualific.Text:=Trim(IBQIncQualificsTypeQualific.AsString);
EditInstitution.Text:=Trim(IBQIncQualificsInstitution.AsString);
EditDocuments.Text:=Trim(IBQIncQualificsDocuments.AsString);
EditSerialDoc.Text:=Trim(IBQIncQualificsSerialDoc.AsString);
DTPDocum.DateTime:=Trunc(IBQIncQualificsDateDocum.AsDateTime);
EditBasis.Text:=Trim(IBQIncQualificsBasis.AsString);
DTPOrder.DateTime:=Trunc(IBQIncQualificsDateOrder.AsDateTime);
end;
DTPBegin.SetFocus;
end;
procedure TFEditIncQualifics.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
procedure TFEditIncQualifics.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
begin
with DM do
case key of
13: begin
if AddIncQualific then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_IncQualifics,0) from IncQualifics');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into IncQualifics (Employers,');
IBQExecSQL.SQL.Append('DateFrom,');
IBQExecSQL.SQL.Append('DateTo,');
IBQExecSQL.SQL.Append('TypeQualific,');
IBQExecSQL.SQL.Append('Institution,');
IBQExecSQL.SQL.Append('Documents,');
IBQExecSQL.SQL.Append('SerialDoc,');
IB QExec S QL SQL.Append('D ateDocum,');
IBQExecSQL.SQL.Append('Basis,');
IBQExecSQL.SQL.Append('DateOrder)');
IBQExecSQL.SQL.Append('Values ('+IntToStr(IBQEmployersID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditTypeQualific.Text)+chr(39)+',');
IB QExec S QL .S QL. Append(chr(39)+Trim(EditInstitution.Text)+chr(39)+',');
IB QExec S QL .S QL. Append(chr(39)+Trim(EditDocuments.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditSerialDoc.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPDocum.Date)+chr(39)+',');
IB QExec S QL .S QL. Append(chr(39)+Trim(EditBasis.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPOrder.Date)+chr(39)+')');
end else begin
RecSave :=IBQIncQualificsID.AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update IncQualifics');
IB QExec S QL S QL Append('Set
DateFrom='+chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('DateTo='+chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('TypeQualific='+chr(39)+Trim(EditTypeQualific.Text)+chr(39)+
',');
IBQExecSQL.SQL.Append('Institution='+chr(39)+Trim(EditInstitution.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('Documents='+chr(39)+Trim(EditDocuments.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('SerialDoc='+chr(39)+Trim(EditSerialDoc.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('DateDocum='+chr(39)+DateToStr(DTPDocum.Date)+chr(39)+',
');
IBQExecSQL.SQL.Append('Basis='+chr(39)+Trim(EditBasis.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('DateOrder='+chr(39)+DateToStr(DTPOrder.Date)+chr(39));
IB QExec S QL S QL. Append('Where ID='+IntToStr(Rec Save));
end;
IBQExecSQL.ExecSQL;
IBQIncQualifics.Close;
IBQIncQualifics.Open;
IBQIncQualifics.Locate('ID',RecSave,[loCaseInsensitive]);
FEditlncQualifics.Close
end;
27: FEditlncQualifics.Close;
end;
end;
end.
unit EditFurloughs;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, StdCtrls, DB, Mask;
type
TFEditFurloughs = class(TForm)
LabelTypes: TLabel;
LabelCountDays: TLabel;
LabelDateOrder: TLabel;
LabelNumberOrder: TLabel;
LabelBeginWorks: TLabel;
LabelEndWorks: TLabel;
DTPOrder: TDateTimePicker;
EditNumberOrder: TEdit;
DTPBeginWorks: TDateTimePicker;
DTPEndWorks: TDateTimePicker;
PanelFurloughs: TPanel;
SBEditFurloughs: TStatusBar;
DTPBegin: TDateTimePicker;
LabelBegin: TLabel;
LabelEnd: TLabel;
DTPEnd: TDateTimePicker;
CBTypes: TComboBox;
MaskEditCountDays: TMaskEdit;
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
FEditFurloughs: TFEditFurloughs;
AddFurlough:Boolean;
implementation
uses DataModule, EditEmployers, Main;
{$R *.dfm}
procedure TFEditFurloughs.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do begin
if AddFurlough then begin
CBTypes.Text:-';
DTPBeginWorks.DateTime:=Trunc(Date());
DTPEndWorks.DateTime:=Trunc(Date());
DTPBegin.DateTime:=Trunc(Date());
DTPEnd.DateTime:=Trunc(Date());
MaskEditCountDays.Text:='28';
EditNumberOrder.Text:='';
DTPOrder.DateTime:=Trunc(Date());
end else begin
CBTypes.Text:=Trim(IBQFurloughsTypes.AsString);
DTPBeginWorks.DateTime:=IBQFurloughsDateWorksFrom.AsDateTime;
DTPEndWorks.DateTime:=IBQFurloughsDateWorksTo.AsDateTime;
DTPBegin.DateTime:=IBQFurloughsDateFrom.AsDateTime;
DTPEnd.DateTime:=IBQFurloughsDateTo.AsDateTime;
MaskEditCountDays.Text:=IntToStr(IBQFurloughsCountDays.AsInteger);
EditNumberOrder.Text:=Trim(IBQFurloughsNumberOrder.AsString);
DTPOrder.DateTime:=IBQFurloughsDateOrder.AsDateTime;
end;
DTPBeginWorks.SetFocus;
end;
end;
procedure TFEditFurloughs.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
CountDays:integer;
Stroka:String;
begin
with DM do
case key of
VK_RETURN: begin
Stroka:=MaskEditCountDays.T ext;
if AllTrim(Stroka)-' then
CountDays:=28
else CountDays:=StrToInt(AllTrim(Stroka));
if AddFurlough then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_Furloughs,0) from Furloughs');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert Into Furloughs (Employers,');
IBQExecSQL.SQL.Append('Types,');
IBQExecSQL.SQL.Append('DateWorksFrom,');
IBQExecSQL.SQL.Append('DateWorksTo,');
IBQExecSQL.SQL.Append('DateFrom,');
IBQExecSQL.SQL.Append('DateTo,');
IBQExecSQL.SQL.Append('CountDays,');
IB QExec S QL .S QL .Append('Numb erOrder,');
IBQExecSQL.SQL.Append('DateOrder)');
IBQExecSQL.SQL.Append('Values ('+IntToStr(IBQEmployersID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(CBTypes.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPBeginWorks.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPEndWorks.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(IntToStr(CountDays)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditNumberOrder.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPOrder.Date)+chr(39)+')');
end else begin
RecSave:=IB QF urloughsID .AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update Furloughs');
IBQExecSQL.SQL.Append('Set Types='+chr(39)+Trim(CBTypes.Text)+chr(39)+',');
IB QExec S QL .S QL .Append('DateWorksFrom='+chr(39)+DateT oStr(DTPB eginW orks.Date)+
chr(39)+',');
IBQExecSQL.SQL.Append('DateWorksTo='+chr(39)+DateToStr(DTPEndWorks.Date)+chr(
39)+',');
IBQExecSQL.SQL.Append('DateFrom='+chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('DateTo='+chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('CountDays='+IntToStr(CountDays)+',');
IB QExec S QL .S QL .Append('NumberOrder='+chr(39)+Trim(EditNumberOrder.Text)+chr(39)
+',');
IBQExecSQL.SQL.Append('DateOrder='+chr(39)+DateToStr(DTPOrder.Date)+chr(39));
IBQExecSQL.SQL.Append('Where ID='+IntToStr(RecSave));
end;
IBQExecSQL.ExecSQL;
IBQFurloughs.Close;
IBQFurloughs.Open;
IBQFurloughs.Locate('ID',RecSave,[loCaseInsensitive]);
FEditFurloughs.Close;
end;
VK_ESCAPE: FEditFurloughs.Close;
end;
end;
procedure TFEditFurloughs.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
end.
unit EditFormations;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, ExtCtrls, StdCtrls, DB, Mask;
type
TFEditFormations = class(TForm)
LabelProfession: TLabel;
LabelInstitution: TLabel;
LabelQualification: TLabel;
LabelSerialDoc: TLabel;
LabelNumberDoc: TLabel;
LabelYearEnd: TLabel;
EditProfession: TEdit;
EditQualification: TEdit;
EditSerialDoc: TEdit;
EditNumberDoc: TEdit;
PanelEditFormation: TPanel;
SBEditFormation: TStatusBar;
EditInstitution: TEdit;
MaskEditYearEnd: TMaskEdit;
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
FEditFormations: TFEditFormations;
FormationAdd:Boolean;
implementation
uses EditEmployers, DataModule, Main;
{$R *.dfm}
procedure TFEditFormations.FormActivate(Sender: TObject);
begin
Left:=Round((GetSystemMetrics(SM_CXSCREEN)-Width)/2);
Top:=Round((GetSystemMetrics(SM_CYSCREEN)-Height)/2);
with DM do
if FormationAdd then begin
EditInstitution.Text:-';
EditProfessi on.Text:='';
EditQualification.Text:-';
EditSerialDoc.Text:-';
EditNumberDoc .Text:='';
MaskEditYearEnd.Text:=Copy(DateToStr(Date()),7,4);
end else begin
EditInstitution.Text:=Trim(IBQFormationsInstitution.AsString);
EditProfession.Text:=Trim(IBQFormationsProfession.AsString);
EditQualification.Text:=Trim(IBQFormationsQualification.AsString);
EditSerialDoc.Text:=Trim(IBQFormationsSerialDoc.AsString);
EditNumberDoc.Text:=Trim(IBQFormationsNumberDoc.AsString);
MaskEditYearEnd.Text: =IntToStr(IB QF ormati onsYearEnd.AsInteger);
end;
EditInstitution.SetFocus;
end;
procedure TFEditFormations.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
procedure TFEditFormations.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
YearEnd:Integer;
Stroka:String;
begin
with DM do
case key of
VK_RETURN: begin
Stroka :=MaskEditYearEnd.Text;
if AllTrim(Stroka)=M then
YearEnd:=StrToInt(Copy(DateToStr(Date()),7,4))
else Y earEnd:=StrT oInt(AllTrim(Stroka));
if FormationAdd then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_Formations,0) from Formations');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into Formations (Employers,');
IB QExec S QL .SQL.Append('Institution,');
IBQExecSQL.SQL.Append('Profession,');
IBQExecSQL.SQL.Append('Qualification,');
IBQExecSQL.SQL.Append('SerialDoc,');
IBQExecSQL.SQL.Append('NumberDoc,');
IBQExecSQL.SQL.Append('YearEnd)');
IBQExecSQL.SQL.Append('Values ('+IntToStr(IBQEmployersID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditInstitution.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditProfession.Text)+chr(39)+',');
IB QExec S QL .S QL .Append(chr(39)+Trim(EditQualification.Text)+chr(39)+',');
IB QExec S QL .S QL .Append(chr(39)+Trim(EditSerialDoc.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditNumberDoc.Text)+chr(39)+',');
IB QExec S QL .S QL .Append(IntToStr(YearEnd)+')');
end else begin
RecSave:=IB QF ormati onsID.AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update Formations');
IB QExec S QL S QL Append('Set
Institution='+chr(39)+Trim(EditInstitution.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('Profession='+chr(39)+Trim(EditProfession.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('Qualification='+chr(39)+Trim(EditQualification.Text)+chr(39)+'
,');
IBQExecSQL.SQL.Append('SerialDoc='+chr(39)+Trim(EditSerialDoc.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('NumberDoc='+chr(39)+Trim(EditNumberDoc.Text)+chr(39)+','
);
IB QExec S QL .S QL .Append('YearEnd='+IntToStr(YearEnd));
IBQExecSQL.SQL.Append('where ID='+IntToStr(RecSave));
end;
IBQExecSQL.ExecSQL;
IBQFormations.Close;
IBQFormations.Open;
IBQFormations.Locate('ID',RecSave,[loCaseInsensitive]);
FEditFormations.Close;
{ end;}
end;
VK_ESCAPE: FEditFormations.Close;
end;
end;
end.
unit EditFamilys;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls, DB;
type
TFEditFamilys = class(TForm)

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

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