﻿----------------------------Mostafa 2022-05-22----------------
update ConfigCategory set Arabic_Name=N'التقيم' where ConfigCategoryCode=10
GO
update ConfigParameter set Arabic_Name=N'تذكير قبل انتهاء فترة التقييم باليوم' where ConfigKey='ApprReminderBeforFinishAppraisalPeriodByDay'
GO
update ConfigParameter set Arabic_Name=N'مدة وقت التذكير' where ConfigKey='ApprReminderTimeDuration'
GO
update ConfigParameter set Arabic_Name=N'نوع مدة وقت التذكير' where ConfigKey='ApprReminderTimeDurationType'
Go
----------------------------End 2022-05-22----------------
----------------------------Ali 2022-05-23----------------

CREATE TABLE [dbo].[SkillsTypes](
	[SkillTypeCode] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](150) NOT NULL,
	[Arabic_Name] [nvarchar](150) NOT NULL,
	[Color] [nvarchar](max) NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModificationDate] [datetime] NULL,
 CONSTRAINT [PK_SkillsTypes] PRIMARY KEY CLUSTERED 
(
	[SkillTypeCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[EmployeesSkills](
	[EmployeeSkillCode] [int] IDENTITY(1,1) NOT NULL,
	[SkillTypeCode] [int] NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[Percentage] [float] NULL,
	[CreatedBy] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModificationDate] [datetime] NULL,
 CONSTRAINT [PK_EmployeesSkills] PRIMARY KEY CLUSTERED 
(
	[EmployeeSkillCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[EmployeesSkills]  WITH CHECK ADD  CONSTRAINT [FK_EmployeesSkills_Employees] FOREIGN KEY([EmployeeCode])
REFERENCES [dbo].[Employees] ([EmployeeCode])
GO

ALTER TABLE [dbo].[EmployeesSkills] CHECK CONSTRAINT [FK_EmployeesSkills_Employees]
GO

ALTER TABLE [dbo].[EmployeesSkills]  WITH CHECK ADD  CONSTRAINT [FK_EmployeesSkills_SkillsTypes] FOREIGN KEY([EmployeeSkillCode])
REFERENCES [dbo].[SkillsTypes] ([SkillTypeCode])
GO

ALTER TABLE [dbo].[EmployeesSkills] CHECK CONSTRAINT [FK_EmployeesSkills_SkillsTypes]
GO



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(624,N'skills types',N'انواع المهارات',402,N'/SkillType',N'Index','fa fa-thumb-tack',N'get',3,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(624,6)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1339,N'انواع المهارات',N'skills types',624,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1340,N'عرض انواع المهارات',N'View skills types',624,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1341,N'إضافة انواع المهارات',N'Add skills types',624,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1342,N'تعديل انواع المهارات',N'Edit skills types',624,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1343,N'حذف انواع المهارات',N'Delete skills types',624,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1344,N'حفظ انواع المهارات',N'Save skills types',624,2)
Go


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(625,N'Employees Skills',N'مهارات الموظفين',402,N'/EmployeeSkill',N'Index','fa fa-thumb-tack',N'get',4,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(625,6)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1345,N'مهارات الموظفين',N'Employees Skills',625,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1346,N'عرض مهارات الموظفين',N'View Employees Skills',625,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1347,N'إضافة مهارات الموظفين',N'Add Employees Skills',625,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1348,N'تعديل مهارات الموظفين',N'Edit Employees Skills',625,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1349,N'حذف مهارات الموظفين',N'Delete Employees Skills',625,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1350,N'حفظ مهارات الموظفين',N'Save Employees Skills',625,2)
Go
----------------------------End 2022-05-23----------------