﻿
update EmailTemplateType set [Arabic_Name]=N'تغير حالة التسجيل في الخطه الدورة التدريبة' where EmailTemplateTypeCode=379
GO
------------------------------------------- End 2023-12-04 ------------------------------------------------------
------------------------------------------- Ali 2023-12-05 ------------------------------------------------------

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1026,N' Social Care Type',N'انواع الرعاية الاجتماعية',28,N'/WorkFlow/SocialCareType',N'Index','fa fa-thumb-tack',N'get',31,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1026,1)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15429,N'انواع الرعاية الاجتماعية',N' Social Care Type',1026,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15430,N'عرض انواع الرعاية الاجتماعية',N'View  Social Care Type',1026,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15431,N'إضافة انواع الرعاية الاجتماعية',N'Add  Social Care Type',1026,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15432,N'تعديل انواع الرعاية الاجتماعية',N'Edit  Social Care Type',1026,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15433,N'حذف انواع الرعاية الاجتماعية',N'Delete  Social Care Type',1026,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15434,N'حفظ انواع الرعاية الاجتماعية',N'Save  Social Care Type',1026,2)
Go

-- SSTAuthorizationActionFilterBefore (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1358,N'WorkFlow',N'SocialCareType',N'Index',0,N'get',15429)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1359,N'WorkFlow',N'SocialCareType',N'SocialCareType_Read',0,N'post',15430)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1360,N'WorkFlow',N'SocialCareType',N'Save',1,N'get',15431)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1361,N'WorkFlow',N'SocialCareType',N'Save',2,N'get',15432)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1362,N'WorkFlow',N'SocialCareType',N'Delete',0,N'post',15433)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1363,N'WorkFlow',N'SocialCareType',N'Save',0,N'post',15434)

-- Api security privilege End Point (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(915,NULL, NULL,N'SocialCareType',N'GetSocialCareTypeSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(916,NULL, NULL,N'SocialCareType',N'GetSocialCareType',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(917,NULL, NULL,N'SocialCareType',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(918,NULL, NULL,N'SocialCareType',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(919,NULL, NULL,N'SocialCareType',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(920,NULL, NULL,N'SocialCareType',N'Get',N'Get')
Go
-- Api security privilege End Point Detail (script only not added in db Check it and run if you want) 

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1143,915,15430, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1144,916,15430, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1145,917,15434, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1146,918,15434, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1147,919,15433, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1148,920,15432, NULL)
Go

------------------------------------------- End 2023-12-05 ------------------------------------------------------
------------------------------------------- Mostafa 2023-12-06 ------------------------------------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(703,N'Managing Training Course Plans',N'ادارة خطط الدورات التدريبية',662,NULL,NULL,' fa fa-cogs',NULL,1,1,1)

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(703,20)
Go

update [SystemMenu] set [ParentID]=703 where [SystemMenuCode] in (667,701,668,669,702)
------------------------------------------- End 2023-12-06 ------------------------------------------------------


------------------------------------------- Negm 2023-12-06 ------------------------------------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1028,N'GPS attendance',N'الحضور عبر GPS',345,N'',N'','fa fa-thumb-tack',N'',11,1,1)
Go 
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1028,11)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13112,N'الحضور عبر GPS',N'GPS attendance',1028,1)
Go

INSERT  SystemMenu ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])values 
 (1027,N'FingerPrints Outside FingerPrint Area' , N' بصمات من خارج مساحة البصمة ' , 345 , N'/Attendance/FingerPrintsOutsideFingerPrintArea', N'Index','fa fa-thumb-tack' , N'get' , 10,1,1)
 Go

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

update SystemMenu set ParentID = 1028 where  SystemMenuCode = 582
Go

 update SystemMenu set ParentID = 1028 where  SystemMenuCode = 655
 Go

 update SystemMenu set ParentID = 1028 where  SystemMenuCode = 1027
 Go


INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13106,N'بصمات خارج مساحة البصمة',N'FingerPrints Outside FingerPrint Area',1027,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13107,N'عرض بصمات خارج مساحة البصمة',N'View FingerPrints Outside FingerPrint Area',1027,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13108,N'إضافة بصمات خارج مساحة البصمة',N'Add FingerPrints Outside FingerPrint Area',1027,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13109,N'تعديل بصمات خارج مساحة البصمة',N'Edit FingerPrints Outside FingerPrint Area',1027,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13110,N'حذف بصمات خارج مساحة البصمة',N'Delete FingerPrints Outside FingerPrint Area',1027,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13111,N'حفظ بصمات خارج مساحة البصمة',N'Save FingerPrints Outside FingerPrint Area',1027,2)
Go

  update SystemMenu set ControllerName= N'/Attendance/FingerPrintsOutsideArea' where SystemMenuCode= 1027

------------------------------------------- End 2023-12-06 ------------------------------------------------------


----------------------------------Negm 2023-12-6---------------------------------------------------------
  update SystemMenu set ControllerName= N'/Attendance/FingerPrintsOutsideArea' where SystemMenuCode= 1027
---------------------------------------End  2023-12-06 ----------------------------------------------------


----------------------------------Negm 2023-12-07---------------------------------------------------------

	 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
---------------------------------------End  2023-12-07 ----------------------------------------------------
----------------------------------------------Negm 2023-12-10------------------------------------

CREATE TABLE dbo.Tmp_Guest
	( 
	  [GuestCode] Tinyint NOT NULL IDENTITY (0, 1) primary Key,
      Name nvarchar(30) NULL,
	  Arabic_Name nvarchar(30) NULL,
	  Categ nvarchar(20)  NULL )  ON [PRIMARY]
GO

Insert into Tmp_Guest ( Name, Arabic_Name,Categ)
SELECT  Name, Arabic_Name, Categ
FROM Guest;
GO

DROP TABLE dbo.Guest
GO

EXECUTE sp_rename N'dbo.Tmp_Guest', N'Guest'
GO


ALTER TABLE dbo.[Guest] ADD
	CreatedBy int NOT NULL CONSTRAINT DF_Guest_CreatedBy DEFAULT (1),
	CreationDate datetime NOT NULL CONSTRAINT DF_Guest_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL
GO

---------------------------------------------End 2023-12-10--------------------------------------
----------------------------------------------Hammad 2023-12-11----------------------------------
ALTER TABLE dbo.FingerArea ADD
	AreaConditions nvarchar(MAX) NULL
GO
---------------------------------------------End 2023-12-11---------------------------------------
-------------------------------- Negm 2023-12-11-----------------------------
 INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1031,N'(12%) Guest',N'ضيف  (12%)',1023,N'/Personal/Guest',N'Index','fa fa-thumb-tack',N'get',3,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1031,22)

Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4024,N'ضيف  (12%)',N'(12%) Guest',1031,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4025,N'عرض ضيف  (12%)',N'View (12%) Guest',1031,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4026,N'إضافة ضيف  (12%)',N'Add (12%) Guest',1031,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4027,N'تعديل ضيف  (12%)',N'Edit (12%) Guest',1031,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4028,N'حذف ضيف  (12%)',N'Delete (12%) Guest',1031,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4029,N'حفظ ضيف  (12%)',N'Save (12%) Guest',1031,2)
Go


 INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1375,N'Personal',N'Guest',N'Index',0,N'get',4024)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1376,N'Personal',N'Guest',N'Guest_Read',0,N'post',4025)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1377,N'Personal',N'Guest',N'Save',1,N'get',4026)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1378,N'Personal',N'Guest',N'Save',2,N'get',4027)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1379,N'Personal',N'Guest',N'Delete',0,N'post',4028)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1380,N'Personal',N'Guest',N'Save',0,N'post',4029)


INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(928,NULL, NULL,N'Guest',N'GetGuestSearch',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(929,NULL, NULL,N'Guest',N'GetGuest',N'Get')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(930,NULL, NULL,N'Guest',N'Put',N'Put')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(931,NULL, NULL,N'Guest',N'post',N'post')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(932,NULL, NULL,N'Guest',N'Delete',N'Delete')
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(933,NULL, NULL,N'Guest',N'Get',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1162,928,4025, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1163,929,4025, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1164,930,4029, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1165,931,4029, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1166,932,4028, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1167,933,4027, NULL)
Go
 

------------------------------------------End 2023-12-11------------------------------
------------------------------------------Hammad 2023-12-12------------------------------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage]) 
VALUES (705, N'Finger Area Employee', N'تسكين الموظفين على مساحة بصمة ', 1028, N'/Attendance/FingerArea', N'FingerAreaEmployee', N'fa fa-street-view', N'get', 8, 1, 0)
GO
INSERT [dbo].[SystemMenuModule] ([SystemMenuCode], [AppModuleCode]) VALUES (705, 11)
GO
------------------------------------------End 2023-12-12------------------------------
------------------------------------------Ali 2023-12-12------------------------------

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1029,N'Social Care Request',N'طلب رعاية اجتماعية',497,N'/WorkFlow/SocialCareRequest',N'Index','fa fa-thumb-tack',N'get',8,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1029,1)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15435,N'طلب رعاية اجتماعية',N'Social Care Request',1029,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15436,N'عرض طلب رعاية اجتماعية',N'View Social Care Request',1029,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15437,N'إضافة طلب رعاية اجتماعية',N'Add Social Care Request',1029,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15438,N'تعديل طلب رعاية اجتماعية',N'Edit Social Care Request',1029,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15439,N'حذف طلب رعاية اجتماعية',N'Delete Social Care Request',1029,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15440,N'حفظ طلب رعاية اجتماعية',N'Save Social Care Request',1029,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15441,N'الغاء طلب رعاية اجتماعية',N'Cancel Social Care Request',1029,2)

Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1364,N'WorkFlow',N'SocialCareRequest',N'Index',0,N'get',15435)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1365,N'WorkFlow',N'SocialCareRequest',N'SocialCareRequest_Read',0,N'post',15436)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1366,N'WorkFlow',N'SocialCareRequest',N'Save',1,N'get',15437)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1367,N'WorkFlow',N'SocialCareRequest',N'Save',2,N'get',15438)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1368,N'WorkFlow',N'SocialCareRequest',N'Delete',0,N'post',15439)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1369,N'WorkFlow',N'SocialCareRequest',N'Save',0,N'post',15440)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1370,N'WorkFlow',N'SocialCareRequest',N'Cancel',0,N'post',15441)
GO
INSERT [dbo].[WF_RequestType] ([RequestTypeId], [RequestTypeName], [RequestTypeNameEn], [IsEditable], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [SubmitBeforRequestDate], [SubmitAfterRequestDate], [IsUsed], [CanDelegation], [DisplayUserName], [HaveAttachment], [WorkedByDefaultContract], [CategoryCode], [RequestTypeGroupCode], [SendEmailNotification], [AsyncWhatsAppMessage], [RequsetPrint], [SignatureRefusedComentMandatory], [IsApi], [IsMasterRequest], [NotifSignCountAction], [NotifSignCountController], [NotifSignCountArea], [IsEnableSSL], [WorkedByAssignmentContract], [IsMobile], [SignatureApprovedCommentMandatory])
VALUES (65,N'طلب رعاية اجتماعية',N'Social Care Request', 0, N'sst.sentmail@gmail.com', N'sst.sentmail@gmail.com', N'mwtjgyjxrrgczlfr', N'smtp.gmail.com', 587, N'SST System', NULL, NULL, 1, 1, 0, 0, 0, 1, 2, 1, 0, 1, 0, 1, 1, N'index', N'SocialCareRequestRequestSignature', N'WorkFlow', 1, 1, 0, 0)
GO
SET IDENTITY_INSERT[dbo].[EmailTemplateType] ON
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(380,N'Social Care Request Sending',N'ارسال طلب رعاية اجتماعية',0,1,65, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(381,N'Social Care Request Accept',N'الموافقة على طلب رعاية اجتماعية',0,1,65, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(382,N'Social Care Request Refuse',N'رفض طلب رعاية اجتماعية',0,1,65, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(383,N'Social Care Request Cancel',N'الغاء طلب رعاية اجتماعية',0,1,65, 1 )
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(384,N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',0,1,65, 1 )

SET IDENTITY_INSERT [dbo].[EmailTemplateType] OFF

SET IDENTITY_INSERT [dbo].[EmailTemplate] ON 
INSERT[dbo].[EmailTemplate]([EmailTemplateCode], [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(4326,N'Social Care Request Sending',N'ارسال طلب رعاية اجتماعية',380,N'ارسال',N'ارسال',1,NULL)

INSERT[dbo].[EmailTemplate]([EmailTemplateCode], [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(4327,N'Social Care Request Accept',N'الموافقة على طلب رعاية اجتماعية',381,N'الموافقة على',N'الموافقة على',1,NULL)

INSERT[dbo].[EmailTemplate]([EmailTemplateCode], [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(4328,N'Social Care Request Refuse',N'رفض طلب رعاية اجتماعية',382,N'رفض',N'رفض',1,NULL)

INSERT[dbo].[EmailTemplate]([EmailTemplateCode], [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(4329,N'Social Care Request Cancel',N'الغاء طلب رعاية اجتماعية',383,N'الغاء',N'الغاء',1,NULL)
INSERT[dbo].[EmailTemplate]([EmailTemplateCode], [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(4330,N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',384,N'ارسال اشعار بعد نهاية المسار',N'ارسال اشعار بعد نهاية المسار',1,NULL)
SET IDENTITY_INSERT [dbo].[EmailTemplate] OFF


INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (921, NULL, NULL, N'SocialCareRequest', N'SearchSocialCareRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (922, NULL, NULL, N'SocialCareRequest', N'GetDetails', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (923, NULL, NULL, N'SocialCareRequest', N'GetWithOutSigById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (924, NULL, NULL, N'SocialCareRequest', N'Put', N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (925, NULL, NULL, N'SocialCareRequest', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (926, NULL, NULL, N'SocialCareRequest', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (927, NULL, NULL, N'SocialCareRequest', N'Get', N'Get')
GO


INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1149, 921, 15436, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1150, 922, 15438, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1151, 923, 15438, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1152, 924, 15440, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1153, 925, 15440, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1154, 926, 15439, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1155, 927, 15438, NULL)
GO


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1030,N'Social Care Request Signature',N'اعتماد طلب رعاية اجتماعية',502,N'/WorkFlow/SocialCareRequestSignature',N'Index','fa fa-thumb-tack',N'get',8,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1030,1)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15442,N'اعتماد طلب رعاية اجتماعية',N'Social Care Request Signature',1030,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15443,N'عرض اعتماد طلب رعاية اجتماعية',N'View Social Care Request Signature',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15444,N'تعديل اعتماد طلب رعاية اجتماعية',N'Edit Social Care Request Signature',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15445,N'حفظ اعتماد طلب رعاية اجتماعية',N'Save Social Care Request Signature',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15446,N'حفظ متعدد للاعتماد',N'Multiple Save',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15447,N'عرض سجل الموظف',N'View Employee History',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15448,N'ارجاع الطلب',N'Inverse Request',1030,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15449,N'اختيار كل الطلبات',N'Choose All Requests',1030,2)

Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1371,N'WorkFlow',N'SocialCareRequestSignature',N'Index',0,N'get',15442)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1372,N'WorkFlow',N'SocialCareRequestSignature',N'SocialCareRequestSignature_Read',0,N'post',15443)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1373,N'WorkFlow',N'SocialCareRequestSignature',N'Save',2,N'get',15444)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1374,N'WorkFlow',N'SocialCareRequestSignature',N'Save',0,N'post',15445)
Go

 INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1156, 12, 15441, 65)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1157, 9, 15443, 65)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1158, 10, 15443, 65)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1159, 8, 15444, 65)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1160, 13, 15445, 65)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1161, 11, 15447, 65)
Go
------------------------------------------End 2023-12-12------------------------------
--------------------------------------- AK 2023-12-12 ---------
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1032,N'General dashboard',N'لوحة القياس العامة',115,N'/GeneralDashboard',N'Index','fa fa-thumb-tack',N'get',12,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1032,6)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(1380,N'لوحة القياس العامة',N'General dashboard',1032,1)
Go
--------------------------------------- End AK 2023-12-12 ------------

--------------------------------------- AK 2023-12-14 ---------
ALTER procedure [dbo].[Emp_GetPaySlip] 
(
@EmpCpde		nvarchar(50),
@TemTable		nvarchar(100),
@CalculateNo	nvarchar(10)
)
as
Begin
--Create  table TempPaySlip(EmployeeCode int,LineValue float,BandCode int,LE_Share float,CurrencyCode tinyint,Effect bit,Hide bit,CollectIn int,CollectInEx int );
declare @query nvarchar(2000);

set @query=' insert into TempPaySlip
SELECT 
[EmployeeCode]     
,[LineValue]    
,Basis.[BandCode]    
,[LE_Share]    
,[CurrencyCode]
,[Hide]
,[CollectIn]
,[CollectInEx]
     
FROM '+@TemTable +' as result inner join [dbo].[Basis] on Basis.BandCode=result.BandCode

where [EmployeeCode]='+@EmpCpde
if(@CalculateNo!='0')
begin
set @query=@query +'and CalculateNumber='+@CalculateNo;
end 

exec(@query);

--SELECT * from paySlip
--INSERT into @tempPaySlip SELECT * from paySlip;

SELECT * from  TempPaySlip
delete  from   TempPaySlip
END
GO
--------------------------------------- End AK 2023-12-14 ------------

--------------------------------------- mostafa 2023-12-14 ------------

ALTER TABLE WF_StaffReplacement
ADD ResignationCode tinyint NOT NULL DEFAULT 0
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13113,N'تحميل مساحات البصمة',N'Finger Areas Template',582,2)
GO

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1387,N'Attendance',N'FingerArea',N'FingerAreasTemplate',0,N'post',13113)
GO

ALTER TABLE FingerArea ADD SerialNo INT  NULL;
GO
WITH CTE AS (SELECT SerialNo,ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS RowNum FROM FingerArea)UPDATE CTE SET SerialNo = RowNum
GO
--------------------------------------- End AK 2023-12-14 ------------

-------------------------------------Hammad 2023-12-21 ------------------------
update WF_LoanRequestSplitDetail set MaxInstallmentsCount =1 where IsInstallment=0
Go
ALTER TABLE dbo.WF_LoanRequest ADD
	LoanBandCode int NULL
GO
-------------------------------------End 2023-12-21 ---------------------------
---------------------------------------Negm 2023-12-21----------------------------
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.Tmp_PenaltyCategories
	(
	PenaltyCategoryCode int NOT NULL IDENTITY (1, 1),
	Name nvarchar(150) NULL,
	Arabic_Name nvarchar(150) NULL,
	Closed bit NULL,
	MDT datetime NULL
	)  ON [PRIMARY]
GO
ALTER TABLE dbo.Tmp_PenaltyCategories SET (LOCK_ESCALATION = TABLE)
GO
SET IDENTITY_INSERT dbo.Tmp_PenaltyCategories ON
GO
IF EXISTS(SELECT * FROM dbo.PenaltyCategories)
	 EXEC('INSERT INTO dbo.Tmp_PenaltyCategories (PenaltyCategoryCode, Name, Arabic_Name, Closed, MDT)
		SELECT PenaltyCategoryCode, Name, Arabic_Name, Closed, MDT FROM dbo.PenaltyCategories WITH (HOLDLOCK TABLOCKX)')
GO
SET IDENTITY_INSERT dbo.Tmp_PenaltyCategories OFF
GO
ALTER TABLE dbo.WF_BonusTypePenalty
	DROP CONSTRAINT FK_WF_BonusTypePenalty_PenaltyCategories
GO
ALTER TABLE dbo.CandidacyTypePenalty
	DROP CONSTRAINT FK_CandidacyTypePenalty_PenaltyCategories
GO
DROP TABLE dbo.PenaltyCategories
GO
EXECUTE sp_rename N'dbo.Tmp_PenaltyCategories', N'PenaltyCategories', 'OBJECT' 
GO
ALTER TABLE dbo.PenaltyCategories ADD CONSTRAINT
	PK_PenaltyCategories_PenaltyCategoryCode PRIMARY KEY CLUSTERED 
	(
	PenaltyCategoryCode
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.CandidacyTypePenalty ADD CONSTRAINT
	FK_CandidacyTypePenalty_PenaltyCategories FOREIGN KEY
	(
	PenaltyCategoryCode
	) REFERENCES dbo.PenaltyCategories
	(
	PenaltyCategoryCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO
ALTER TABLE dbo.CandidacyTypePenalty SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.WF_BonusTypePenalty ADD CONSTRAINT
	FK_WF_BonusTypePenalty_PenaltyCategories FOREIGN KEY
	(
	PenaltyCategoryCode
	) REFERENCES dbo.PenaltyCategories
	(
	PenaltyCategoryCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO
ALTER TABLE dbo.WF_BonusTypePenalty SET (LOCK_ESCALATION = TABLE)
GO
COMMIT



  ALTER TABLE dbo.[PenaltyCategories] ADD
	CreatedBy int NOT NULL CONSTRAINT DF_PenaltyCategories_CreatedBy DEFAULT (1),
	CreationDate datetime NOT NULL CONSTRAINT DF_PenaltyCategories_CreationDate DEFAULT (getdate()),
	ModifiedBy int NULL,
	ModificationDate datetime NULL
GO


ALTER TABLE [PenaltyCategories]
ADD PenaltyCategoriesSerial nvarchar(150) null ;
Go

Update [PenaltyCategories] SET PenaltyCategoriesSerial=PenaltyCategoryCode where PenaltyCategoryCode=PenaltyCategoryCode
Go



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1033,N'Penalty Categories',N'فئات العقوبات',1023,N'/Personal/PenaltyCategories',N'Index','fa fa-thumb-tack',N'get',4,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(1033,22)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4030,N'فئات العقوبات',N'Penalty Categories',1033,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4031,N'عرض فئات العقوبات',N'View Penalty Categories',1033,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4032,N'إضافة فئات العقوبات',N'Add Penalty Categories',1033,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4033,N'تعديل فئات العقوبات',N'Edit Penalty Categories',1033,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4034,N'حذف فئات العقوبات',N'Delete Penalty Categories',1033,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(4035,N'حفظ فئات العقوبات',N'Save Penalty Categories',1033,2)
Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1397,N'Personal',N'PenaltyCategories',N'Index',0,N'get',4030)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1398,N'Personal',N'PenaltyCategories',N'PenaltyCategories_Read',0,N'post',4031)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1399,N'Personal',N'PenaltyCategories',N'Save',1,N'get',4032)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1400,N'Personal',N'PenaltyCategories',N'Save',2,N'get',4033)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1401,N'Personal',N'PenaltyCategories',N'Delete',0,N'post',4034)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID])
VALUES(1402,N'Personal',N'PenaltyCategories',N'Save',0,N'post',4035)
Go



INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(934,NULL, NULL,N'PenaltyCategories',N'GetPenaltyCategoriesSearch',N'post')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(935,NULL, NULL,N'PenaltyCategories',N'GetPenaltyCategories',N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(936,NULL, NULL,N'PenaltyCategories',N'Put',N'Put')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(937,NULL, NULL,N'PenaltyCategories',N'post',N'post')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(938,NULL, NULL,N'PenaltyCategories',N'Delete',N'Delete')
Go

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) 
VALUES(939,NULL, NULL,N'PenaltyCategories',N'Get',N'Get')
Go


INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1169,934,4031, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1170,935,4031, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1171,936,4035, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1172,937,4035, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1173,938,4034, NULL)
Go
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1174,939,4033, NULL)
Go


update SecurityPrivilegeEndPointsDetails set SecurityPrivilegeId = 3583 where id = 355
Go
------------------------------------End 2023-12-21--------------------------------------------------------------
------------------------------------Ali 2023-12-25--------------------------------------------------------------


CREATE TABLE [dbo].[WF_RequestsFile](
	[RequestFileCode] [int] IDENTITY(1,1) NOT NULL,
	[RequestId] [bigint] NOT NULL,
	[FileName] [nvarchar](500) NOT NULL,
	[RequestTypeCode] [int] NOT NULL,
 CONSTRAINT [PK_WF_RequestsFile] PRIMARY KEY CLUSTERED 
(
	[RequestFileCode] 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
------------------------------------End 2023-12-25--------------------------------------------------------------
------------------------------------Ali 2023-12-26--------------------------------------------------------------

ALTER TABLE dbo.[WF_DisclaimerRequestSignature] ADD
	UserTypeCode int NULL
GO
------------------------------------End 2023-12-26--------------------------------------------------------------
------------------------------------Hammad 2023-12-26------------------------------------------------------------
INSERT [dbo].[SecurityPrivilege] ([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType])
VALUES (15450, N'توثيق طلب تجديد العقد   ', N'Documenting Renew Contract', 1011, 2)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) 
VALUES (1404, N'WorkFlow', N'RenewContractRequest', N'DocumentContract', 0, N'post', 15450)
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES (940, NULL, NULL, N'RenewContractRequest', N'DocumentContract', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId])
VALUES (1175, 940, 15450, NULL)
GO
------------------------------------End 2023-12-26------------------------------------------------------------