﻿ 

CREATE TABLE [dbo].[NotificationUserType](
	[NotificationUserTypeCode] [int] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[Arabic_Name] [nvarchar](100) NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_EmailUserType] PRIMARY KEY CLUSTERED 
(
	[NotificationUserTypeCode] 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

CREATE TABLE [dbo].[SaveVacations](
	[SerialAuto] [int] IDENTITY(1,1) NOT NULL,
	[MonthNumber] [int] NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[PYear] [smallint] NOT NULL,
	[Period] [tinyint] NOT NULL,
	[Salary] [float] NULL,
	[StartDate] [datetime] NULL,
	[OpenDays] [float] NULL,
	[OpenAmount] [float] NULL,
	[AddedDays] [float] NULL,
	[AddedAmount] [float] NULL,
	[TakenDays] [float] NULL,
	[TakenAmount] [float] NULL,
	[AdjustmentDays] [float] NULL,
	[AdjustmentAmount] [float] NULL,
	[CloseDays] [float] NULL,
	[CloseAmount] [float] NULL,
	[MDT] [datetime] NULL,
	[CostCenter] [nvarchar](20) NULL,
 CONSTRAINT [PK_Vacations] PRIMARY KEY CLUSTERED 
(
	[SerialAuto] 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


CREATE TABLE [dbo].[CostCenterAndAccountDistribution](
	[SerialAuto] [int] IDENTITY(1,1) NOT NULL,
	[CostCenter] [nvarchar](50) NOT NULL,
	[BandCode] [int] NOT NULL,
	[AccountCode] [nvarchar](100) NULL,
	[T0] [nvarchar](20) NULL,
	[T1] [nvarchar](20) NULL,
	[T2] [nvarchar](20) NULL,
	[T3] [nvarchar](20) NULL,
	[T4] [nvarchar](20) NULL,
	[T5] [nvarchar](20) NULL,
	[T6] [nvarchar](20) NULL,
	[T7] [nvarchar](20) NULL,
	[T8] [nvarchar](20) NULL,
	[T9] [nvarchar](20) NULL,
	[AddBy] [nvarchar](20) NULL,
	[AddDate] [datetime] NULL,
	[LastChangeBy] [nvarchar](20) NULL,
	[ChangeDate] [datetime] NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_CostCenterAndAccountDistribution_CostCenter_BandCode] PRIMARY KEY CLUSTERED 
(
	[CostCenter] ASC,
	[BandCode] 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


CREATE View [dbo].[ResultNetFinalPaymentAll] 
as  Select * from ResultNetFinalPayment2015
 Union all Select * from ResultNetFinalPayment2016
 Union all Select * from ResultNetFinalPayment2017
 Union all Select * from ResultNetFinalPayment2018
 Union all Select * from ResultNetFinalPayment2019
 Union all Select * from ResultNetFinalPayment2020
 Union all Select * from ResultNetFinalPayment2021
GO




CREATE TABLE [dbo].[SaveIndemnity](
	[SerialAuto] [int] IDENTITY(1,1) NOT NULL,
	[MonthNumber] [int] NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[PYear] [smallint] NOT NULL,
	[Period] [tinyint] NOT NULL,
	[Salary] [float] NULL,
	[StartDateOfIndemnity] [datetime] NULL,
	[OpenDays] [float] NULL,
	[OpenAmount] [float] NULL,
	[AddedDays] [float] NULL,
	[AddedAmount] [float] NULL,
	[TakenDays] [float] NULL,
	[TakenAmount] [float] NULL,
	[AdjustmentDays] [float] NULL,
	[AdjustmentAmount] [float] NULL,
	[CloseDays] [float] NULL,
	[CloseAmount] [float] NULL,
	[AllYears] [float] NULL,
	[AllMonths] [float] NULL,
	[AllDays] [float] NULL,
	[MDT] [datetime] NULL,
	[ServiceDurationNumber] [float] NULL,
	[ServiceDurationText] [nvarchar](10) NULL,
	[CostCenter] [nvarchar](20) NULL,
 CONSTRAINT [PK_SaveIndemnity] PRIMARY KEY CLUSTERED 
(
	[SerialAuto] 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


CREATE TABLE [dbo].[Periods](
	[Period] [tinyint] NOT NULL,
	[Name] [nvarchar](20) NULL,
	[Arabic_Name] [nvarchar](20) NULL,
	[TransactionDayes] [tinyint] NULL,
	[MonthDays] [int] NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_Periods] PRIMARY KEY CLUSTERED 
(
	[Period] 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



CREATE TABLE [dbo].[NotifEmployeesGroup](
	[NotifEmployeesGroupId] [int] IDENTITY(1,1) NOT NULL,
	[GroupArabic_Name] [nvarchar](150) NOT NULL,
	[GroupName] [nvarchar](150) NOT NULL,
	[EMail] [nvarchar](100) NOT NULL,
	[EmployeeType] [tinyint] NOT NULL,
 CONSTRAINT [PK_NotifEmployeeGroup] PRIMARY KEY CLUSTERED 
(
	[NotifEmployeesGroupId] 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].[NotifEmployeesGroup] ADD  DEFAULT ((2)) FOR [EmployeeType]
GO


CREATE TABLE [dbo].[NotifEmployeesGroupDetails](
	[NotifEmployeeGroupDetailsId] [int] IDENTITY(1,1) NOT NULL,
	[NotifEmployeeGroupId] [int] NOT NULL,
	[EmployeeCode] [int] NOT NULL,
 CONSTRAINT [PK_NotifEmployeesGroupDetails] PRIMARY KEY CLUSTERED 
(
	[NotifEmployeeGroupDetailsId] 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].[NotifEmployeesGroupDetails]  WITH CHECK ADD  CONSTRAINT [FK_NotifEmployeesGroupDetails_NotifEmployeeGroup] FOREIGN KEY([NotifEmployeeGroupId])
REFERENCES [dbo].[NotifEmployeesGroup] ([NotifEmployeesGroupId])
GO

ALTER TABLE [dbo].[NotifEmployeesGroupDetails] CHECK CONSTRAINT [FK_NotifEmployeesGroupDetails_NotifEmployeeGroup]
GO


CREATE TABLE [dbo].[NotificationLookup](
	[LookupDetailCode] [int] NOT NULL,
	[LookupCode] [int] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[Arabic_Name] [nvarchar](100) NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_NotifLookup] PRIMARY KEY CLUSTERED 
(
	[LookupDetailCode] 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



CREATE TABLE [dbo].[NotificationFlag](
	[NotificationFlagCode] [bigint] IDENTITY(1,1) NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[NotificationTypeCode] [int] NOT NULL,
	[NotificationDate] [datetime] NOT NULL,
	[NotificationKind] [tinyint] NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_NotificationFlag] PRIMARY KEY CLUSTERED 
(
	[NotificationFlagCode] 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].[NotificationFlag] ADD  CONSTRAINT [DF_NotificationFlag_NotificationKind]  DEFAULT ((0)) FOR [NotificationKind]
GO

ALTER TABLE [dbo].[NotificationFlag]  WITH CHECK ADD  CONSTRAINT [FK_NotificationFlag_NotificationTemplateType] FOREIGN KEY([NotificationTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationFlag] CHECK CONSTRAINT [FK_NotificationFlag_NotificationTemplateType]
GO



CREATE TABLE [dbo].[NotifPaySlip](
	[NotifPaySlipCode] [int] IDENTITY(1,1) NOT NULL,
	[PYear] [smallint] NOT NULL,
	[Period] [tinyint] NOT NULL,
	[CalculateNumber] [tinyint] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModificationDate] [datetime] NULL,
	[SectionCode] [nvarchar](max) NULL,
	[MDT] [datetime] NULL,
	[Status] [tinyint] NULL,
 CONSTRAINT [PK_NotifPaySlip] PRIMARY KEY CLUSTERED 
(
	[NotifPaySlipCode] 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

ALTER TABLE [dbo].[NotifPaySlip]  WITH CHECK ADD  CONSTRAINT [CreatedByUser] FOREIGN KEY([CreatedBy])
REFERENCES [dbo].[SecurityUser] ([SecurityUserCode])
GO

ALTER TABLE [dbo].[NotifPaySlip] CHECK CONSTRAINT [CreatedByUser]
GO

ALTER TABLE [dbo].[NotifPaySlip]  WITH CHECK ADD  CONSTRAINT [FK_NotifPaySlip_NotifMonth] FOREIGN KEY([Period])
REFERENCES [dbo].[Periods] ([Period])
GO

ALTER TABLE [dbo].[NotifPaySlip] CHECK CONSTRAINT [FK_NotifPaySlip_NotifMonth]
GO

ALTER TABLE [dbo].[NotifPaySlip]  WITH CHECK ADD  CONSTRAINT [ModifiedByUser] FOREIGN KEY([ModifiedBy])
REFERENCES [dbo].[SecurityUser] ([SecurityUserCode])
GO

ALTER TABLE [dbo].[NotifPaySlip] CHECK CONSTRAINT [ModifiedByUser]
GO





CREATE TABLE [dbo].[NotifPaySlipDetail](
	[NotifPaySlipDetailCode] [int] IDENTITY(1,1) NOT NULL,
	[NotifPaySlipCode] [int] NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[EMail] [varchar](250) NULL,
	[IsSent] [bit] NOT NULL,
	[SentDate] [datetime] NULL,
	[Reason] [nvarchar](max) NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_NotifPaySlipDetail] PRIMARY KEY CLUSTERED 
(
	[NotifPaySlipDetailCode] 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

ALTER TABLE [dbo].[NotifPaySlipDetail]  WITH CHECK ADD  CONSTRAINT [FK_NotifPaySlipDetail_NotifPaySlip] FOREIGN KEY([NotifPaySlipCode])
REFERENCES [dbo].[NotifPaySlip] ([NotifPaySlipCode])
GO

ALTER TABLE [dbo].[NotifPaySlipDetail] CHECK CONSTRAINT [FK_NotifPaySlipDetail_NotifPaySlip]
GO

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

ALTER TABLE [dbo].[NotifPaySlipDetail] CHECK CONSTRAINT [FK_NotifPaySlipDetail_Employees]
GO


ALTER TABLE dbo.Levels ADD
	LevelNotApplicableToTransportationAllowance bit NULL,
	Closed bit NULL,
	MDT datetime NULL,
	CentralCode int NULL
GO

ALTER TABLE dbo.EmployeesExtend ADD
	HeHasNoRightToReceiveTheSalaryReceipt bit NULL
GO


CREATE TABLE [dbo].[NotificationTemplateType](
	[NotificationTemplateTypeCode] [int] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[Arabic_Name] [nvarchar](100) NOT NULL,
	[IsEditable] [bit] NOT NULL,
	[NotificationTiming] [int] NOT NULL,
	[IsNotificationTimingEnabled] [bit] NOT NULL,
	[DurationType] [int] NOT NULL,
	[Duration] [int] NOT NULL,
	[IsDurationEnabled] [bit] NOT NULL,
	[SenderUserName] [nvarchar](250) NOT NULL,
	[SenderFrom] [nvarchar](250) NOT NULL,
	[SenderPassword] [nvarchar](250) NOT NULL,
	[SenderHostName] [nvarchar](250) NOT NULL,
	[SenderPort] [int] NOT NULL,
	[SenderName] [nvarchar](250) NOT NULL,
	[IsActive] [bit] NOT NULL,
	[MinVacationBalance] [int] NULL,
	[IsSendToOldManager] [bit] NOT NULL,
	[MDT] [datetime] NULL,
	[EnableSsl] [bit] NOT NULL,
	[EnableAttachment] [bit] NOT NULL,
 CONSTRAINT [PK_NotificationType] PRIMARY KEY CLUSTERED 
(
	[NotificationTemplateTypeCode] 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].[NotificationTemplateType] ADD  CONSTRAINT [DF_NotificationTemplateType_SenderFrom]  DEFAULT ((123)) FOR [SenderFrom]
GO

ALTER TABLE [dbo].[NotificationTemplateType] ADD  DEFAULT ((0)) FOR [IsSendToOldManager]
GO

ALTER TABLE [dbo].[NotificationTemplateType] ADD  DEFAULT ((1)) FOR [EnableSsl]
GO

ALTER TABLE [dbo].[NotificationTemplateType] ADD  DEFAULT ((1)) FOR [EnableAttachment]
GO



CREATE TABLE [dbo].[NotificationTemplate](
	[NotificationTemplateCode] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[Arabic_Name] [nvarchar](100) NOT NULL,
	[NotificationTemplateTypeCode] [int] NOT NULL,
	[Subject] [nvarchar](100) NOT NULL,
	[Body] [nvarchar](max) NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_NotificationTemplate] PRIMARY KEY CLUSTERED 
(
	[NotificationTemplateCode] 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

ALTER TABLE [dbo].[NotificationTemplate]  WITH CHECK ADD  CONSTRAINT [FK_NotificationTemplate_NotificationTemplateType] FOREIGN KEY([NotificationTemplateTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationTemplate] CHECK CONSTRAINT [FK_NotificationTemplate_NotificationTemplateType]
GO



CREATE TABLE [dbo].[Projects](
	[ProjectCode] [int] NOT NULL,
	[Name] [nvarchar](255) NULL,
	[Arabic_Name] [nvarchar](255) NULL,
	[Closed] [bit] NULL,
	[ManagerCode] [int] NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_Projects_ProjectCode] PRIMARY KEY CLUSTERED 
(
	[ProjectCode] 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.EmployeesExtend ADD
	OutOfTimePenaltiesActions bit NULL
GO




CREATE TABLE [dbo].[NotificationRecieverDetail](
	[RecieverDetailCode] [int] IDENTITY(1,1) NOT NULL,
	[NotificationTemplateTypeCode] [int] NOT NULL,
	[NotificationUserTypeCode] [int] NOT NULL,
	[SpecifiedEmails] [nvarchar](1024) NULL,
	[RecieverType] [int] NOT NULL,
	[MDT] [datetime] NULL,
 CONSTRAINT [PK_EmailRecieverDetail] PRIMARY KEY CLUSTERED 
(
	[RecieverDetailCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_EmailRecieverDetail_EmailTemplateType] FOREIGN KEY([NotificationTemplateTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_EmailRecieverDetail_EmailTemplateType]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_NotificationRecieverDetail_NotificationTemplateType] FOREIGN KEY([NotificationTemplateTypeCode])
REFERENCES [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_NotificationRecieverDetail_NotificationTemplateType]
GO

ALTER TABLE [dbo].[NotificationRecieverDetail]  WITH CHECK ADD  CONSTRAINT [FK_NotificationRecieverDetail_NotificationUserType] FOREIGN KEY([NotificationUserTypeCode])
REFERENCES [dbo].[NotificationUserType] ([NotificationUserTypeCode])
GO

ALTER TABLE [dbo].[NotificationRecieverDetail] CHECK CONSTRAINT [FK_NotificationRecieverDetail_NotificationUserType]
GO



CREATE TABLE [dbo].[Promotions](
	[Serial] [float] NOT NULL,
	[EmployeeCode] [int] NULL,
	[PromotionReasonCode] [tinyint] NULL,
	[PromotionDate] [datetime] NULL,
	[OldSalary] [float] NULL,
	[NewSalary] [float] NULL,
	[Oldguest] [tinyint] NULL,
	[OldSection] [nvarchar](6) NULL,
	[OldPosition] [nvarchar](30) NULL,
	[OldLevel] [tinyint] NULL,
	[Newguest] [tinyint] NULL,
	[NewSection] [nvarchar](6) NULL,
	[NewPosition] [nvarchar](30) NULL,
	[NewLevel] [tinyint] NULL,
	[Closed] [bit] NULL,
	[OldLocation] [tinyint] NULL,
	[NewLocation] [tinyint] NULL,
	[OldBasicSalary] [float] NULL,
	[NewBasicSalary] [float] NULL,
	[PositingDate] [datetime] NULL,
	[IncreasesAmount] [float] NULL,
	[Fixedinsurance] [float] NULL,
	[OldExSalary] [float] NULL,
	[NewExSalary] [float] NULL,
	[CurrencyCode] [tinyint] NULL,
	[IncreasesCurrencyAmount] [float] NULL,
	[OldBasicCurrency] [float] NULL,
	[NewBasicCurrency] [float] NULL,
	[SystemType] [int] NULL,
	[PositingDateHijri] [nvarchar](10) NULL,
	[PromotionDateHijri] [nvarchar](10) NULL,
	[RecordAddBy] [nvarchar](20) NULL,
	[RecordAddDate] [datetime] NULL,
	[RecordLastChangeBy] [nvarchar](20) NULL,
	[RecordChangeDate] [datetime] NULL,
	[Comment] [nvarchar](255) NULL,
	[OldProjectCode] [int] NULL,
	[NewProjectCode] [int] NULL,
	[OldEmployeeGradeCode] [int] NULL,
	[NewEmployeeGradeCode] [int] NULL,
	[ChangeTypeCode] [int] NULL,
	[LocationApprovedProgressNumber] [int] NULL,
	[LocationApproved] [bit] NULL,
	[DepartmentalProgressNumber] [int] NULL,
	[DepartmentalApproved] [bit] NULL,
	[SalaryApproved] [bit] NULL,
	[IndemnityAmount] [float] NULL,
	[VacationsAmount] [float] NULL,
	[MDT] [datetime] NULL,
	[BAnnual] [float] NULL,
	[BDayOff] [float] NULL,
	[BHolidays] [float] NULL,
 CONSTRAINT [PK_Promotions] PRIMARY KEY CLUSTERED 
(
	[Serial] 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].[Promotions] ADD  CONSTRAINT [DF_Promotions_Serial]  DEFAULT ((0)) FOR [Serial]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_PromotionReasonCode]  DEFAULT ((0)) FOR [PromotionReasonCode]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_NewSalary]  DEFAULT ((0)) FOR [NewSalary]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_Oldguest]  DEFAULT ((0)) FOR [Oldguest]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_OldLevel]  DEFAULT ((0)) FOR [OldLevel]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_Newguest]  DEFAULT ((0)) FOR [Newguest]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_NewLevel]  DEFAULT ((0)) FOR [NewLevel]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_Closed]  DEFAULT ((0)) FOR [Closed]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_OldLocation]  DEFAULT ((0)) FOR [OldLocation]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_NewLocation]  DEFAULT ((0)) FOR [NewLocation]
GO

ALTER TABLE [dbo].[Promotions] ADD  CONSTRAINT [DF_Promotions_SalaryApproved]  DEFAULT ((0)) FOR [SalaryApproved]
GO



 -------------------- Ali 2021-04-08 ----------------------------------- 


 SET IDENTITY_INSERT [dbo].[AppModule] ON 
INSERT [dbo].[AppModule] ([AppModuleCode], [Name], [Arabic_Name], [IsLicensed], [LicenseNumber]) VALUES (13, N'Notifications Services', N'اشعارات البريد الالكترونى', 1, NULL)
SET IDENTITY_INSERT [dbo].[AppModule] OFF
Go
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (479, N'Notifications Services', N'اشعارات البريد الالكترونى', NULL, NULL, NULL, N'fa fa-thumb-tack', NULL, 19, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (480, N'Notifications Services Basic Data', N'بيانات اساسية للإشعارات البريد الالكترونى', 479, NULL, NULL, N'fa fa-thumb-tack', NULL, 1, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (481, N'Notification Types', N'أنواع الإشعارات', 480, N'/NotificationService/NotificationTemplateType', N'Index', N'fa fa-thumb-tack', N'get', 1, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (482, N'Email Templates', N'نماذج البريد الإلكتروني', 480, N'/NotificationService/NotificationTemplate', N'Index', N'fa fa-thumb-tack', N'get', 2, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (483, N'Setting Notification Types', N'اعداد انواع الاشعارات', 480, N'/NotificationService/NotificationTemplateType', N'SettingTypes', N'fa fa-thumb-tack', N'get', 6, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (484, N'Employees Groups', N'مجموعات الموظفين', 480, N'/NotificationService/EmailEmployeesGroup', N'Index', N'fa fa-thumb-tack', N'get', 4, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (485, N'Services', N'خدمات', 479, NULL, NULL, N'fa fa-thumb-tack', NULL, 2, 1, 1)
GO
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (486, N'Pay Slip', N'شيت الراتب', 485, N'/NotificationService/EmailPaySlip', N'Index', N'fa fa-thumb-tack', N'get', 1, 1, 1)

INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (479, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (480, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (481, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (482, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (483, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (484, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (485, 13)
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (486, 13)
Go

INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16006, N'أنواع الإشعارات', N'Notification Types', 481, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16007, N'عرض أنواع الإشعارات ', N'View  Notification Types', 481, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16008, N'تعديل أنواع الإشعارات ', N'Edit Notification Types', 481, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16009, N'حفظ  أنواع الإشعارات ', N'Save Notification Types', 481, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16010, N'نماذج البريد الإلكتروني ', N'Email Templates', 482, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16011, N'عرض نماذج البريد الإلكتروني ', N'View Email Templates', 482, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16012, N'تعديل نماذج البريد الإلكتروني ', N'Edit Email Templates', 482, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16013, N'حفظ  نماذج البريد الإلكتروني ', N'Save Email Templates', 482, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16014, N'حذف  نماذج البريد الإلكتروني', N'Delete Email Templates', 482, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16015, N'اعداد انواع الاشعارات', N'Setting Notification Types ', 483, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16016, N' حفظ  اعداد انواع الاشعارات ', N' Save Setting Notification Types ', 483, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16020, N'مجموعات الموظفين', N'Employees Groups', 484, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16021, N'عرض مجموعات الموظفين', N'View Employees Groups', 484, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16022, N'إضافة مجموعات الموظفين', N'Add Employees Groups', 484, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16023, N'تعديل مجموعات الموظفين', N'Edit Employees Groups', 484, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16024, N'حذف مجموعات الموظفين', N'Delete Employees Groups', 484, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16025, N'حفظ مجموعات الموظفين', N'Save Employees Groups', 484, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16026, N'شيت الراتب', N'Pay Slip', 486, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16027, N'عرض شيت الراتب', N'View Pay Slip', 486, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16028, N'إضافة شيت الراتب', N'Add Pay Slip', 486, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16029, N'تعديل شيت الراتب', N'Edit Pay Slip', 486, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (16030, N'حفظ شيت الراتب', N'Save Pay Slip', 486, 2)

Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (642, N'NotificationService', N'EmailEmployeesGroup', N'Index', 0, N'get', 16020)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (643, N'NotificationService', N'EmailEmployeesGroup', N'EmailEmployeesGroup_Read', 0, N'post', 16021)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (644, N'NotificationService', N'EmailEmployeesGroup', N'Save', 1, N'get', 16022)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (645, N'NotificationService', N'EmailEmployeesGroup', N'Save', 2, N'get', 16023)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (646, N'NotificationService', N'EmailEmployeesGroup', N'Save', 0, N'post', 16024)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (647, N'NotificationService', N'EmailEmployeesGroup', N'Save', 2, N'post', 16025)


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (648, N'NotificationService', N'NotificationTemplateType', N'Index', 0, N'get', 16006)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (649, N'NotificationService', N'NotificationTemplateType', N'NotificationTemplateTypes_Read', 0, N'post', 16007)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (650, N'NotificationService', N'NotificationTemplateType', N'Save', 2, N'get', 16008)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (651, N'NotificationService', N'NotificationTemplateType', N'Save', 0, N'post', 16009)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (652, N'NotificationService', N'NotificationTemplate', N'Index', 0, N'get', 16010)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (653, N'NotificationService', N'NotificationTemplate', N'NotificationTemplate_Read', 0, N'post', 16011)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (654, N'NotificationService', N'NotificationTemplate', N'Save', 2, N'get', 16012)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (655, N'NotificationService', N'NotificationTemplate', N'Save', 0, N'post', 16013)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (656, N'NotificationService', N'NotificationTemplate', N'Delete', 0, N'post', 16014)

Go


-- Periods data

INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (1, N'January', N'يناير', 31, 31, CAST(N'2021-01-12T09:54:11.593' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (2, N'February', N'فبراير', 31, 28, CAST(N'2021-01-12T09:54:11.593' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (3, N'March', N'مارس', 28, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (4, N'April', N'أبريل', 31, 30, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (5, N'May', N'مايو', 30, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (6, N'June', N'يونيو', 31, 30, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (7, N'July', N'يوليو', 30, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (8, N'August', N'أغسطس', 31, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (9, N'September', N'سبتمبر', 31, 30, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (10, N'October', N'أكتوبر', 30, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (11, N'November', N'نوفمبر', 31, 30, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO
INSERT [dbo].[Periods] ([Period], [Name], [Arabic_Name], [TransactionDayes], [MonthDays], [MDT]) VALUES (12, N'December', N'ديسمبر', 30, 31, CAST(N'2021-01-12T09:54:11.610' AS DateTime))
GO


-- script for new page Notifications Services Config


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) VALUES (487, N'Work Settings', N'إعدادات العمل', 480, N'/NotificationService/SystemConfig', N'Index', N'fa fa-thumb-tack', N'get', 5, 1, 1)
Go
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES ( 487, 13)
Go
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1267, N'إعدادات عمل اشعارات البريد الالكترونى', N'Notifications Services Config', 487, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1268, N'عرض إعدادات العمل', N'View Inventory Config', 487, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (1269, N'حفظ إعدادات العمل', N'Save Inventory Config', 487, 2)
Go
INSERT [dbo].[ConfigCategory] ([ConfigCategoryCode], [Name], [Arabic_Name]) VALUES (13, N'Notifications Services', N'اشعارات البريد الالكترونى	')
Go
INSERT [dbo].[ConfigParameter] ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId]) VALUES (N'NotifMaxNumberOfEmployeeInGroup', N'Max Number Of Employee In Group', N'اقصى عدد للموظفين بالمجموعة', N'250', 13, 1, 2, 1, NULL, NULL, NULL)
Go

alter table [NotificationTemplateType]
add HaveUserAccount bit not null default(1)
Go




---

INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (1, N'Missing Sign In', N'عدم قيام الموظف بتسجيل بصمة الدخول', 0, 0, 0, 0, 30, 1, N'human.resources.sst@gmail.com', N'human.resources.sst@gmail.com', N'9tsudQg9ACTGBHCg7/3Bqg==', N'smtp.gmail.com', 587, N'SST', 1, NULL, 0, NULL, 1, 0, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (2, N'Missing Sign Out', N'عدم قيام الموظف بتسجيل بصمة الخروج', 0, 5, 0, 2, 11, 1, N'99', N'99', N'9tsudQg9ACTGBHCg7/3Bqg==', N'99', 999, N'99', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (3, N'Late Time', N'التأخير', 0, 6, 0, 3, 0, 0, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (4, N'Short Time', N'التقصير', 0, 6, 0, 3, 0, 0, N'human.resources.sst@gmail.com', N'human.resources.sst@gmail.com', N'rwua7N3K5MSOM4uQgx8NOg==', N'smtp.sendgrid.net', 587, N'SST', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (5, N'Time Permissions Out', N'اسنفاذ الموظف عدد الأذون الشخصية', 0, 6, 0, 3, 0, 0, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (6, N'New Hire', N'المعينين الجدد', 0, 5, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (7, N'Expired Probation Period', N'نهاية فترة الاختبار', 0, 4, 0, 1, 15, 1, N'marakez.payslip@Marakez.net', N'HR.Services@Marakez.net', N'ktZoJIpYZx5ZRExTSnLvXA==', N'outlook.office365.com', 587, N'HR Services', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (8, N'Resignations', N'الاستقالات', 0, 5, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (9, N'Departmental Changes', N'التغييرات الإدارية', 0, 5, 0, 1, 1, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (10, N'Birth Day', N'أعياد الميلاد', 0, 6, 1, 1, 1, 1, N'marakez.payslip@Marakez.net', N'Birthday@Marakez.net', N'ktZoJIpYZx5ZRExTSnLvXA==', N'outlook.office365.com', 587, N'Birthday', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (11, N'Vacation Balance', N'رصيد الاجازات', 0, 6, 0, 1, 1, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, 5, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (12, N'Contract Expiration', N'انتهاء التعاقد', 0, 4, 0, 1, 75, 1, N'marakez.payslip@Marakez.net', N'HR.Services@Marakez.net', N'ktZoJIpYZx5ZRExTSnLvXA==', N'outlook.office365.com', 587, N'HR Services', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (13, N'Pay Slip', N'كشف الراتب', 0, 6, 0, 3, 0, 0, N'human.resources.sst@gmail.com', N'human.resources.sst@gmail.com', N'TT9Ghaglos4X1jChtmFZtg==', N'smtp.gmail.com', 587, N'Payslip', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (14, N'ID Personal Expiration', N' انتهاء البطاقة الشخصية', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (15, N'Military Certificate', N'شهادة التجنيد', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (16, N'Health Card', N'الشهادة الصحية', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (17, N'Driving License', N'رخصة القيادة', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (18, N'Medical Insurance', N'التأمين الصحي', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (19, N'Rescue Certificate', N'شهادة الانقاذ', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (20, N'Skill Test Expiration', N'شهادة قياس مستوى المهارة', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (21, N'Marine Certificate', N'شهادة البحارة', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (22, N'Criminal Investigation', N'كارنيه البحث الجنائي', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (23, N'Work Permission', N'تصاريح العمل', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (24, N'Residence', N'الاقامة', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (25, N'Retirement', N'المعاش', 0, 4, 0, 1, 2, 1, N'789789', N'123', N'rwua7N3K5MSOM4uQgx8NOg==', N'55', 555, N'55', 0, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (26, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 0, 6, 1, 1, 1, 1, N'human.resources.sst@gmail.com', N'human.resources.sst@gmail.com', N'TT9Ghaglos4X1jChtmFZtg==', N'smtp.gmail.com', 587, N'SST', 1, NULL, 0, NULL, 1, 1, 1)
GO
INSERT [dbo].[NotificationTemplateType] ([NotificationTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [NotificationTiming], [IsNotificationTimingEnabled], [DurationType], [Duration], [IsDurationEnabled], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [IsActive], [MinVacationBalance], [IsSendToOldManager], [MDT], [EnableSsl], [EnableAttachment], [HaveUserAccount]) VALUES (27, N'Vaction Due', N'أرصدة الإجازات', 0, 6, 1, 1, 1, 1, N'789789', N'123', N'8tCWsaMkm/xvVDyAbcC+qg==', N'smtp.sendgrid.net', 587, N'SST', 1, NULL, 0, NULL, 1, 1, 1)
SET IDENTITY_INSERT [dbo].[NotificationTemplate] ON 

INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1, N'Missing Sign In', N'عدم قيام الموظف بتسجيل بصمة الدخول', 1, N'عدم قيام الموظف بتسجيل بصمة الدخول', N'<div style="direction:rtl;"><p>لم تقم بتسجيل بصمة الدخول يوم&nbsp;<span contenteditable="false">@Model.MissingSignDate</span></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (2, N'Late Time', N'التأخير', 3, N'التأخير', N'<div style="direction:rtl;"><p>لقد تاخرت عن ميعاد العمل بـ&nbsp;<span contenteditable="false">@Model.MinutesCount</span>&nbsp;دقيقة يوم&nbsp;<span contenteditable="false">@Model.EventDate</span></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3, N'Missing Sign Out', N'عدم قيام الموظف بتسجيل بصمة الخروج', 2, N'عدم قيام الموظف بتسجيل بصمة الخروج', N'<div style="direction:rtl;">لقد غادرت العمل بدون تسجيل بصمة الخروج في تاريخ&nbsp;<span contenteditable="false">@Model.MissingSignDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (4, N'Short Time', N'التقصير', 4, N'التقصير', N'<div style="direction:rtl;">لقد غادرت قبل انتهاء وقت العمل ب&nbsp;<span contenteditable="false">@Model.MinutesCount</span>&nbsp;دقيقة يوم&nbsp;<span contenteditable="false">@Model.EventDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (5, N'Time Permissions Out', N'اسنفاذ الموظف عدد الأذون الشخصية', 5, N'اسنفاذ الموظف عدد الأذون الشخصية', N'<div style="direction:rtl;"><p>اسنفذت الأذونات المسموحة لـ&nbsp;<span contenteditable="false">@Model.PermissionType</span></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (6, N'New Hire', N'المعينين الجدد', 6, N'المعينين الجدد', N'<p>لقد تم التعيين في تاريخ&nbsp;&nbsp;<span contenteditable="false">@Model.HiringDate</span></p><p><span contenteditable="false">@Model.EmployeesList</span></p>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (7, N'Expired Probation Period', N'نهاية فترة الاختبار', 7, N'End of Probation Notice', N'<p><span style="font-family:''DINOT'',''sans-serif'';"></span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Dear,</span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;font-variant-ligatures:normal;font-variant-caps:normal;orphans:2;text-align:start;widows:2;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Kindly note that we are approaching the end of the &nbsp;probation period for "<span contenteditable="false">@Model.EmployeeName</span>" on "&nbsp;@Model.ProbationPeriodDate ".</span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;font-variant-ligatures:normal;font-variant-caps:normal;orphans:2;text-align:start;widows:2;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Please fill the attached form and revert to&nbsp;<a href="mailto:Knazieh@maralez.net"><span style="color:#0000AA;">Knazih@marakez.net</span></a>&nbsp;&amp;&nbsp;<a href="mailto:dbaher@marakez.net"><span style="color:#0000AA;">dbaher@marakez.net</span></a>&nbsp; by maximum one working week.</span><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;"></span></p><p><span style="font-family:''DINOT'',''sans-serif'';"></span><span style="font-family:''DINOT'',''sans-serif'';"></span></p><p style="direction:ltr;"><span style="font-size:small;font-family:DINOT, sans-serif;">Many Thanks,</span></p><div><table style="width:677px;"><colgroup><col /><col /></colgroup><tbody><tr><td><span style="font-family:''Liberation Serif'';color:#1f497d;"><img width="157" height="140" src="http://mshr01:83/Images/EmailFiles/1.jpg" alt="cid:image001.png@01D17895.30F1D3B0" v:shapes="Picture_x0020_14" /></span></td><td><span style="font-family:DINOT, sans-serif;color:#1f2a5c;">HR Department&nbsp;</span><br /><span style="font-size:10pt;font-family:DINOT, sans-serif;">T&nbsp;<strong>:&nbsp;</strong>+2 02 3826 0200</span><br /><span style="font-size:10pt;font-family:DINOT, sans-serif;">Juhayna Square (Mall of Arabia) 6th Of October, Egypt</span><span style="font-size:10pt;font-family:DINOT, sans-serif;color:#1f2a5c;">.</span><br /><a href="http://www.marakez.net/" target="_blank"><span style="font-size:10pt;font-family:DINOT, sans-serif;">www.marakez.net</span></a></td></tr></tbody></table><p>&nbsp;</p><p>&nbsp;</p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (8, N'Resignations', N'الاستقالات', 8, N'الاستقالات', N'<div style="direction:rtl;"><p>الاستقالة يوم&nbsp;<span contenteditable="false">@Model.ResignationDate</span></p><p>&nbsp;</p><p>&nbsp;</p><p>ygfghffjfhjfjffghfh</p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (9, N'Departmental Changes', N'التغييرات الإدارية', 9, N'التغييرات الإدارية', N'<div style="direction:rtl;"><p>تمت الترقيه يوم&nbsp;<span contenteditable="false">@Model.PromotionDate</span></p><p>القسم القديم&nbsp;<span contenteditable="false">@Model.OldSection</span>&nbsp;القسم الجديد&nbsp;<span contenteditable="false">@Model.NewSection</span></p><p>من مستوى وظيفي&nbsp;<span contenteditable="false">@Model.OldLevel</span>&nbsp;الى مستوى وظيفي&nbsp;<span contenteditable="false">@Model.NewLevel</span></p><p>&nbsp;</p><p><img src="/Images/EmailFiles/CrystalreportIssuepng.png" alt="" width="100" height="100" /></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (10, N'Birth Day', N'أعياد الميلاد', 10, N'HAPPY BIRTHDAY', N'<div style="direction:rtl;"><p>&nbsp;</p><p>&nbsp;</p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (11, N'Vacation Balance', N'رصيد الاجازات', 11, N'رصيد الاجازات', N'<div style="direction:rtl;">اصبح رصيد اجازات&nbsp;<span contenteditable="false">@Model.VacationBalance</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (12, N'Contract Expiration', N'انتهاء التعاقد', 12, N'Contract Renewal Notice', N'<p><span style="font-family:''DINOT'',''sans-serif'';">&nbsp;</span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Dear,</span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;font-variant-ligatures:normal;font-variant-caps:normal;orphans:2;text-align:start;widows:2;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Kindly note that we are approaching the end of the &nbsp;contract period for "&nbsp;<span contenteditable="false">@Model.EmployeeName</span>&nbsp;" on "&nbsp;@Model.ContractExpireDate&nbsp;".</span></p><p style="margin-top:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;font-variant-ligatures:normal;font-variant-caps:normal;orphans:2;text-align:start;widows:2;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px;"><span style="font-size:9.0pt;font-family:''DINOT'',sans-serif;color:black;">Please fill the attached form and revert to&nbsp;<a href="mailto:Knazieh@maralez.net"><span style="color:#0000AA;">Knazih@marakez.net</span></a>&nbsp;&amp;&nbsp;<a href="mailto:dbaher@marakez.net"><span style="color:#0000AA;">dbaher@marakez.net</span></a>&nbsp;by maximum one working week.</span></p><p><span style="font-family:''DINOT'',''sans-serif'';"></span><span style="font-family:''DINOT'',''sans-serif'';"></span></p><p style="direction:ltr;"><span style="font-size:small;font-family:DINOT, sans-serif;">Many Thanks,</span></p><div><table style="width:738px;"><colgroup><col /><col /></colgroup><tbody><tr><td><span style="font-family:''Liberation Serif'';color:#1f497d;"><img width="157" height="140" src="http://mshr01:83/Images/EmailFiles/1.jpg" alt="cid:image001.png@01D17895.30F1D3B0" v:shapes="Picture_x0020_14" /></span></td><td><span style="font-family:DINOT, sans-serif;color:#1f2a5c;">HR Department&nbsp;</span><br /><span style="font-size:10pt;font-family:DINOT, sans-serif;">T&nbsp;<strong>:&nbsp;</strong>+2 02 3826 0200</span><br /><span style="font-size:10pt;font-family:DINOT, sans-serif;">Juhayna Square (Mall of Arabia) 6th Of October, Egypt</span><span style="font-size:10pt;font-family:DINOT, sans-serif;color:#1f2a5c;">.</span><br /><a href="http://www.marakez.net/" target="_blank"><span style="font-size:10pt;font-family:DINOT, sans-serif;">www.marakez.net</span></a></td></tr></tbody></table></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (13, N'Pay Slip', N'كشف الراتب', 13, N'Monthly  Payslip', N'<p><span style="font-family:DINOT, sans-serif;font-size:small;">Dear</span><span style="font-family:DINOT, sans-serif;font-size:small;">,</span></p><span style="font-size:small;"></span><p><span style="font-family:DINOT, sans-serif;font-size:small;">Kindly find attached your monthly payslip.</span></p><p style="direction:rtl;text-align:left;"><span style="font-size:small;font-family:DINOT, sans-serif;">&nbsp;</span></p><p style="direction:rtl;text-align:left;"><span style="font-size:small;font-family:DINOT, sans-serif;"><img src="/NotificationServiceWeb/Images/EmailFiles/sstimag.jpg" alt="" /></span></p><p style="direction:rtl;text-align:left;"><span style="font-size:small;font-family:DINOT, sans-serif;">, Many Thanks</span></p><div><p><span style="font-family:''DINOT'',sans-serif;color:black;">&nbsp;</span></p><p><span style="color:black;">&nbsp;</span></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1012, N'ID Personal Expiration', N' انتهاء البطاقة الشخصية', 14, N' انتهاء البطاقة الشخصية', N'سوف تنتهي البطاقة الشخصية في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1013, N'Military Certificate', N'شهادة التجنيد', 15, N'شهادة التجنيد', N'<div style="direction:rtl;">سوف تنتهي شهادة التجنيد في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1014, N'Health Card', N'الشهادة الصحية', 16, N'الشهادة الصحية', N'سوف تنتهي الشهادة الصحية&nbsp; في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1015, N'Driving License', N'رخصة القيادة', 17, N'رخصة القيادة', N'<div style="direction:rtl;"><p>سوف تنتهي رخصة القيادة في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1016, N'Medical Insurance', N'التأمين الصحي', 18, N'التأمين الصحي', N'<p>سوف ينتهي التأمين الصحي في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span></p>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1017, N'Rescue Certificate', N'شهادة الانقاذ', 19, N'شهادة الانقاذ', N'سوف تنتهي شهداة الانقاذ في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1018, N'Skill Test Expiration', N'شهادة قياس مستوى المهارة', 20, N'شهادة قياس مستوى المهارة', N'<div style="direction:rtl;">سوف تنتهي شهادة قياس مستوى المهارة في تاريخ&nbsp;&nbsp;<span contenteditable="false">@Model.ExpireDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1019, N'Marine Certificate', N'شهادة البحارة', 21, N'شهادة البحارة', N'<div style="direction:rtl;"><p>سوف تنتهي شهادة البحارة في تاريخ&nbsp;&nbsp;<span contenteditable="false">@Model.ExpireDate</span></p><p></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1020, N'Criminal Investigation', N'كارنيه البحث الجنائي', 22, N'كارنيه البحث الجنائي', N'<div style="direction:rtl;">سوف ينتهي كارنيه البحث الجنائي في تاريخ&nbsp;&nbsp;<span contenteditable="false">@Model.ExpireDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1021, N'Work Permission', N'تصاريح العمل', 23, N'تصاريح العمل', N'<div style="direction:rtl;">سوف تنتهي تصاريح العمل في تاريخ&nbsp;<span contenteditable="false">@Model.ExpireDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1022, N'Residence', N'الاقامة', 24, N'الاقامة', N'<div style="direction:rtl;">سوف تنتهي الاقامة في تاريخ&nbsp;&nbsp;<span contenteditable="false">@Model.ExpireDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1023, N'Retirement', N'المعاش', 25, N'المعاش', N'<div style="direction:rtl;">سوف تنتهي مدة الخدمة&nbsp; في تاريخ&nbsp;<span contenteditable="false">@Model.RetirementDate</span></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1024, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong><img src="/NotificationServiceWeb/Images/EmailFiles/sstimag.jpg" alt="" /></strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (1029, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (2029, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3029, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3030, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3031, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3032, N'Vaction Due', N'أرصدة الإجازات', 27, N'أرصدة الإجازات', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Vaction Due</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3033, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3034, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3035, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3036, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3037, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3038, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
INSERT [dbo].[NotificationTemplate] ([NotificationTemplateCode], [Name], [Arabic_Name], [NotificationTemplateTypeCode], [Subject], [Body], [IsDefault], [MDT]) VALUES (3039, N'Anniversary of employee joining the facility', N'الذكرى السنوية للالتحاق الموظف بالمنشأة', 26, N'الذكرى السنوية للالتحاق الموظف بالمنشأة', N'<div style="direction:rtl;"><p><strong>&nbsp;</strong><strong>Anniversary joining the facility</strong><strong>&nbsp;</strong><span contenteditable="false">@Model.EmployeeName</span></p><p><strong>&nbsp;</strong></p></div>', 1, NULL)
GO
SET IDENTITY_INSERT [dbo].[NotificationTemplate] OFF
Go
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (1, N'Employee', N'الموظف', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (2, N'Direct Supervisor', N'المدير المباشر', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (3, N'Section Manager', N'مدير القسم', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (4, N'Department Manager', N'مدير الإدارة', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (5, N'Division Manager', N'مدير القطاع', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (6, N'Specified Email', N'بريد إلكتروني', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name],[MDT]) VALUES (7, N'Location Manager', N'مدير الموقع',NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (9, N'Employee Two', N'الموظف الثانى', NULL)
GO
INSERT [dbo].[NotificationUserType] ([NotificationUserTypeCode], [Name], [Arabic_Name], [MDT]) VALUES (10, N'Direct Supervisor Two', N'المدير المباشر الثانى', NULL)
GO

Go

--NotificationLookup

INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (1, 1, N'Day', N'يوم', NULL)
GO
INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (2, 1, N'Hour', N'ساعة', NULL)
GO
INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (3, 1, N'Minute', N'دقيقة', NULL)
GO
INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (4, 2, N'Before Event', N'قبل الحدث', NULL)
GO
INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (5, 2, N'After Event', N'بعد الحدث', NULL)
GO
INSERT [dbo].[NotificationLookup] ([LookupDetailCode], [LookupCode], [Name], [Arabic_Name], [MDT]) VALUES (6, 2, N'Time of Event', N'وقت الحدث', NULL)
GO



 ----------------------------End 2021-04-08-----------------------------------  

GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (657, N'NotificationService', N'EmailPaySlip', N'Index', 0, N'get', 16026)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (658, N'NotificationService', N'EmailPaySlip', N'EmailPaySlip_Read', 0, N'post', 16027)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (659, N'NotificationService', N'EmailPaySlip', N'Save', 2, N'get', 16028)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (660, N'NotificationService', N'EmailPaySlip', N'Save', 0, N'post', 16029)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES (661, N'NotificationService', N'EmailPaySlip', N'Delete', 0, N'post', 16030)

-------------------------Mostafa 2023-09-05------------------------------

  ALTER TABLE dbo.NotificationTemplate ADD
NotificationBody nvarchar(MAX)  NULL,
NotificationBody_Arabic nvarchar(MAX)  NULL
GO
ALTER TABLE dbo.NotificationTemplateType ADD
IsSendWhatsAppNotifications bit NOT NULL  DEFAULT ((0)),
IsSendRealTimeMobileNotifications bit NOT NULL  DEFAULT ((0)),
IsSendEmailNotifications bit NOT NULL  DEFAULT ((0))
GO
update NotificationTemplateType set IsSendEmailNotifications=1
GO
ALTER TABLE dbo.NotificationFlag ADD
SendByEmail bit NOT NULL  DEFAULT ((0)),
SendByWhatsApp bit NOT NULL  DEFAULT ((0)),
SendByFirebaseNotif bit NOT NULL  DEFAULT ((0))
GO
update NotificationFlag set SendByEmail=1
GO
CREATE TABLE [dbo].[NotificationServiceLog](
	[NotificationServiceLogCode] [int] IDENTITY(1,1) NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[SendBy] [tinyint] NOT NULL,
	[Message] [nvarchar](max) NOT NULL,
	[CreationDate] [datetime] NOT NULL,
 CONSTRAINT [PK_NotificationServiceLog] PRIMARY KEY CLUSTERED 
(
	[NotificationServiceLogCode] 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


-------------------------End 2023-09-05------------------------------

 ----------------------------------------------Hammad 08-01-2024 -----------------------

   	 INSERT INTO SecurityUserDetail ( SecurityUserID,PrivilegeID, CreationDate, CreatedBy)
	  SELECT sec.SecurityUserID,13112, GETDATE(), 1
	  FROM SecurityUserDetail sec 
	WHERE  sec.PrivilegeID in
	(13104,13105,13080,13081,13082,13083,13084,13085);
	Go


INSERT INTO SecurityGroupDetail( SecurityGroupID,PrivilegeID, CreationDate, CreatedBy)
    SELECT gr.SecurityGroupID,13112, GETDATE(), 1
    FROM SecurityGroupDetail gr 
	WHERE  gr.PrivilegeID in
	(13104,13105,13080,13081,13082,13083,13084,13085);
Go

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES (706, N'Promotion Status', N'حالة الترقية ', 246, N'/Appraisal/PromotionStatus', N'Index', N'fa fa-thumb-tack', N'get', 19, 1, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10151, N'حالة الترقية ', N'Promotion Status', 706, 1)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10152, N'عرض حالة الترقية ', N'View Promotion Status', 706, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10153, N'إضافة حالة الترقية ', N'Add Promotion Status', 706, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10154, N'تعديل حالة الترقية ', N'Edit Promotion Status', 706, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10155, N'حذف حالة الترقية ', N'Delete Promotion Status', 706, 2)
GO
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES (10156, N'حفظ حالة الترقية ', N'Save Promotion Status', 706, 2)
GO
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (706, 8)
GO
   ----------------------------------------------End 08-01-2024 -------------------------


   -----------------------------------Negm 09-01-2024 ------------------------------------------
   


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1035,N'Position Tasks',N'المهام الوظيفية',350,N'/Attendance/PositionTasks',N'Index','fa fa-thumb-tack',N'get',5,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1035,11)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13114,N'المهام الوظيفية',N'Position Tasks',1035,1)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13115,N'عرض المهام الوظيفية',N'View Position Tasks',1035,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13116,N'إضافة المهام الوظيفية',N'Add Position Tasks',1035,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13117,N'تعديل المهام الوظيفية',N'Edit Position Tasks',1035,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13118,N'حذف المهام الوظيفية',N'Delete Position Tasks',1035,2)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13119,N'حفظ المهام الوظيفية',N'Save Position Tasks',1035,2)
Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1427,N'Attendance',N'PositionTasks',N'Index',0,N'get',13114)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1428,N'Attendance',N'PositionTasks',N'PositionTasks_Read',0,N'post',13115)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1429,N'Attendance',N'PositionTasks',N'Save',1,N'get',13116)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1430,N'Attendance',N'PositionTasks',N'Save',2,N'get',13117)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1431,N'Attendance',N'PositionTasks',N'Delete',0,N'post',13118)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1432,N'Attendance',N'PositionTasks',N'Save',0,N'post',13119)
Go



INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(954,NULL, NULL,N'PositionTasks',N'SearchPositionTasks',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(955,NULL, NULL,N'PositionTasks',N'GetPositionTasksList',N'Get')
Go																																			  
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(956,NULL, NULL,N'PositionTasks',N'Put',N'Put')
Go																																			  
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(957,NULL, NULL,N'PositionTasks',N'post',N'post')
Go																																			  
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(958,NULL, NULL,N'PositionTasks',N'Delete',N'Delete')
Go																																			  
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(959,NULL, NULL,N'PositionTasks',N'Get',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1231,954,13115, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1232,955,13115, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1233,956,13119, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1234,957,13119, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1235,958,13118, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1236,959,13117, NULL)
Go

----------------------------------End 09-01-2024 -------------------------------------------------------------------------------
----------------------------------Ali 09-01-2024 -------------------------------------------------------------------------------

ALTER TABLE dbo.WF_OverTimeRequestFinalSignature ADD
	UserTypeCode int NULL
GO

ALTER TABLE dbo.WF_CompensationRequestFinalDayRestSignature ADD
	UserTypeCode int NULL
GO
----------------------------------

