﻿
-------------------------mostafa 2023-09-10---------------------------
INSERT INTO [SST.ERP_Client]. [dbo].[APIs] ([ApiId], [ApiName]) VALUES (11, N'Training')
Go
   
SET IDENTITY_INSERT [dbo].[AppModule] ON  
INSERT [dbo].[AppModule] ([AppModuleCode], [Name], [Arabic_Name], [IsLicensed], [LicenseNumber]) VALUES (20, N'Training', N'تدريب', 1, NULL)
SET IDENTITY_INSERT [dbo].[AppModule] OFF
Go

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(662,N'Training',N'تدريب',NULL,NULL,NULL,'fa fa-graduation-cap',NULL,22,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(662,20)
Go

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(663,N'Basic Data Training',N'البيانات الاساسية للتدريب',662,NULL,NULL,'fa fa-thumb-tack',NULL,1,1,1)
Go
INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(663,20)
Go
--******************************************************************************************************
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(664,N'Course Category',N'فئة الدورة التدريبية',663,N'/Training/CourseCategory',N'Index','fa fa-thumb-tack',N'get',1,1,1)
Go

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

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24000,N'فئة الدورة التدريبية',N'Course Category',664,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24001,N'عرض فئة الدورة التدريبية',N'View Course Category',664,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24002,N'إضافة فئة الدورة التدريبية',N'Add Course Category',664,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24003,N'تعديل فئة الدورة التدريبية',N'Edit Course Category',664,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24004,N'حذف فئة الدورة التدريبية',N'Delete Course Category',664,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24005,N'حفظ فئة الدورة التدريبية',N'Save Course Category',664,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1189,N'Training',N'CourseCategory',N'Index',0,N'get',24000)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1190,N'Training',N'CourseCategory',N'CourseCategory_Read',0,N'post',24001)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1191,N'Training',N'CourseCategory',N'Save',1,N'get',24002)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1192,N'Training',N'CourseCategory',N'Save',2,N'get',24003)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1193,N'Training',N'CourseCategory',N'Delete',0,N'post',24004)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1194,N'Training',N'CourseCategory',N'Save',0,N'post',24005)
Go

--******************************************************************************************************
INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(665,N'Trainer',N'مدرب',663,N'/Training/Trainer',N'Index','fa fa-user',N'get',1,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(665,20)
Go
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24006,N'مدرب',N'Trainer',665,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24007,N'عرض مدرب',N'View Trainer',665,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24008,N'إضافة مدرب',N'Add Trainer',665,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24009,N'تعديل مدرب',N'Edit Trainer',665,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24010,N'حذف مدرب',N'Delete Trainer',665,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(24011,N'حفظ مدرب',N'Save Trainer',665,2)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1195,N'Training',N'Trainer',N'Index',0,N'get',24006)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1196,N'Training',N'Trainer',N'Trainer_Read',0,N'post',24007)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(11957,N'Training',N'Trainer',N'Save',1,N'get',24008)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1198,N'Training',N'Trainer',N'Save',2,N'get',24009)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1199,N'Training',N'Trainer',N'Delete',0,N'post',24010)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1200,N'Training',N'Trainer',N'Save',0,N'post',24011)
Go
-------------------------End 2023-09-10---------------------------


-------------------------Mostafa 2023-09-11---------------------------


INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (786, NULL, NULL, N'CourseCategory', N'GetCourseCategorysSearch', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (787, NULL, NULL, N'CourseCategory', N'GetCourseCategorys', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (788, NULL, NULL, N'CourseCategory', N'Put', N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (789, NULL, NULL, N'CourseCategory', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (790, NULL, NULL, N'CourseCategory', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (791, NULL, NULL, N'CourseCategory', N'Get', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1003, 786, 24001, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1004, 787, 24001, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1005, 788, 24003, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1006, 789, 24005, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1007, 790, 24004, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1008, 791, 24002, NULL)
GO

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (792, NULL, NULL, N'Trainer', N'GetTrainersSearch', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (793, NULL, NULL, N'Trainer', N'Put', N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (794, NULL, NULL, N'Trainer', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (795, NULL, NULL, N'Trainer', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (796, NULL, NULL, N'Trainer', N'Get', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (797, NULL, NULL, N'Trainer', N'GetTrainers', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1009, 792, 24007, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1010, 793, 24009, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1011, 794, 24011, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1012, 795, 24010, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1013, 796, 24008, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1014, 797, 24008, NULL)
GO


-------------------------End 2023-09-11---------------------------



-------------------------Ali 2023-09-11---------------------------

update NotificationTemplateType set IsNotificationTimingEnabled=1 where NotificationTemplateTypeCode NOT IN(3,4)
Go
-------------------------End 2023-09-11---------------------------
-------------------------Ali 2023-09-14---------------------------


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1015,N'External Transfer Request',N'طلب نقل خارجي',496,N'/WorkFlow/ClientTransferRequest',N'Index','fa fa-thumb-tack',N'get',24,1,1)
Go

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

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15392,N'طلب نقل خارجي',N'External Transfer Request',1015,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15393,N'عرض طلب نقل خارجي',N'View External Transfer Request',1015,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15394,N'إضافة طلب نقل خارجي',N'Add External Transfer Request',1015,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15395,N'تعديل طلب نقل خارجي',N'Edit External Transfer Request',1015,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15396,N'حذف طلب نقل خارجي',N'Delete External Transfer Request',1015,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15397,N'حفظ طلب نقل خارجي',N'Save External Transfer Request',1015,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15398,N'الغاء طلب نقل خارجي',N'Cancel External Transfer Request',1015,2)

Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1179,N'WorkFlow',N'ClientTransferRequest',N'Index',0,N'get',15392)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1180,N'WorkFlow',N'ClientTransferRequest',N'ClientTransferRequest_Read',0,N'post',15393)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1181,N'WorkFlow',N'ClientTransferRequest',N'Save',1,N'get',15394)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1182,N'WorkFlow',N'ClientTransferRequest',N'Save',2,N'get',15395)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1183,N'WorkFlow',N'ClientTransferRequest',N'Delete',0,N'post',15396)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1184,N'WorkFlow',N'ClientTransferRequest',N'Save',0,N'post',15397)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1217,N'WorkFlow',N'ClientTransferRequest',N'Cancel',0,N'post',15398)
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 
(62, N'طلب نقل خارجى', N'External Transfer Request', 0, N'sstdev65@gmail.com', N'sstdev65@gmail.com', N'eijdtufstisowvvk', N'smtp.gmail.com', 587, N'SST System', NULL, NULL, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, N'index', N'ClientTransferRequestSignature', 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(362,N'External Transfer Request Sending',N'ارسال طلب نقل خارجي',0,1,62, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(363,N'External Transfer Request Accept',N'الموافقة على طلب نقل خارجي',0,1,62, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(364,N'External Transfer Request Refuse',N'رفض طلب نقل خارجي',0,1,62, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(365,N'External Transfer Request Cancel',N'الغاء طلب نقل خارجي',0,1,62, 1 )
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(366,N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',0,1,62, 1 )
SET IDENTITY_INSERT [dbo].[EmailTemplateType] OFF

INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Transfer Request Sending',N'ارسال طلب نقل خارجي',362,N'ارسال',N'ارسال',1,NULL)

INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Transfer Request Accept',N'الموافقة على طلب نقل خارجي',363,N'الموافقة على',N'الموافقة على',1,NULL)

INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Transfer Request Refuse',N'رفض طلب نقل خارجي',364,N'رفض',N'رفض',1,NULL)

INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Transfer Request Cancel',N'الغاء طلب نقل خارجي',365,N'الغاء',N'الغاء',1,NULL)
INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',366,N'ارسال اشعار بعد نهاية المسار',N'ارسال اشعار بعد نهاية المسار',1,NULL)
Go


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1016,N'External Transfer Request Signatures',N'اعتماد طلب نقل خارجي',501,N'/WorkFlow/ClientTransferRequestSignature',N'Index','fa fa-thumb-tack',N'get',27,1,1)
Go

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

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15399,N'اعتماد طلب نقل خارجي',N'External Transfer Request Signatures',1016,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15400,N'عرض اعتماد طلب نقل خارجي',N'View External Transfer Request Signatures',1016,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15401,N'تعديل اعتماد طلب نقل خارجي',N'Edit External Transfer Request Signatures',1016,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15402,N'حفظ اعتماد طلب نقل خارجي',N'Save External Transfer Request Signatures',1016,2)

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

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

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

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

Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1185,N'WorkFlow',N'ClientTransferRequestSignature',N'Index',0,N'get',15399)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1186,N'WorkFlow',N'ClientTransferRequestSignature',N'ClientTransferRequestSignature_Read',0,N'post',15400)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1187,N'WorkFlow',N'ClientTransferRequestSignature',N'Save',2,N'get',15401)

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

INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (779, NULL, NULL, N'ClientTransferRequest', N'SearchClientTransferRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (780, NULL, NULL, N'ClientTransferRequest', N'GetDetails', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (781, NULL, NULL, N'ClientTransferRequest', N'GetWithOutSigById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (782, NULL, NULL, N'ClientTransferRequest', N'Put', N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (783, NULL, NULL, N'ClientTransferRequest', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (784, NULL, NULL, N'ClientTransferRequest', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (785, NULL, NULL, N'ClientTransferRequest', N'Get', N'Get')
GO
 


INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (996, 779, 15393, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (997, 780, 15395, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (998, 781, 15395, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (999, 782, 15397, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1000, 783, 15397, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1001, 784, 15396, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1002, 785, 15395, NULL)
GO



INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (803, NULL, NULL, N'ClientMasterRequestsSignatures', N'GetSignatureById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (804, NULL, NULL, N'ClientMasterRequestsSignatures', N'GetMasterRequestsSignatures', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (805, NULL, NULL, N'ClientMasterRequestsSignatures', N'GetRequestSignaturesByUser', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (806, NULL, NULL, N'ClientMasterRequestsSignatures', N'GetRequestHistory', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (807, NULL, NULL, N'ClientMasterRequestsSignatures', N'CancelRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (808, NULL, NULL, N'ClientMasterRequestsSignatures', N'SaveSignature', N'Post')



 INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1020, 807, 15398, 62)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1021, 804, 15400, 62)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1022, 805, 15400, 62)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1023, 803, 15401, 62)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1024, 808, 15402, 62)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1025, 806, 15404, 62)
Go



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1017,N'External Task Force Request',N'طلب إنتداب خارجى',496,N'/WorkFlow/ClientTaskForceRequest',N'Index','fa fa-thumb-tack',N'get',25,1,1)
Go

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

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15407,N'طلب إنتداب خارجى',N'External Task Force Request',1017,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15408,N'عرض طلب إنتداب خارجى',N'View External Task Force Request',1017,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15409,N'إضافة طلب إنتداب خارجى',N'Add External Task Force Request',1017,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15410,N'تعديل طلب إنتداب خارجى',N'Edit External Task Force Request',1017,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15411,N'حذف طلب إنتداب خارجى',N'Delete External Task Force Request',1017,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15412,N'حفظ طلب إنتداب خارجى',N'Save External Task Force Request',1017,2)
INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15421,N'الغاء طلب إنتداب خارجى',N'Cancel External Task Force Request',1017,2)
Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1207,N'WorkFlow',N'ClientTaskForceRequest',N'Index',0,N'get',15407)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1208,N'WorkFlow',N'ClientTaskForceRequest',N'ClientTaskForceRequest_Read',0,N'post',15408)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1209,N'WorkFlow',N'ClientTaskForceRequest',N'Save',1,N'get',15409)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1210,N'WorkFlow',N'ClientTaskForceRequest',N'Save',2,N'get',15410)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1211,N'WorkFlow',N'ClientTaskForceRequest',N'Delete',0,N'post',15411)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1212,N'WorkFlow',N'ClientTaskForceRequest',N'Save',0,N'post',15412)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1218,N'WorkFlow',N'ClientTaskForceRequest',N'Cancel',0,N'post',15421)
Go


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 (63, N'طلب إنتداب خارجى', N'External Task Force Request', 0, N'sayedmustafa84@yahoo.com', N'sayedmustafa84@yahoo.com', N'1', N'smtp.sendgrid.net', 587, N'SST', NULL, NULL, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, N'index', N'ClientTaskForceRequestSignature', 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(367,N'External Task Force Request Sending',N'ارسال طلب إنتداب خارجى',0,1,63, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(368,N'External Task Force Request Accept',N'الموافقة على طلب إنتداب خارجى',0,1,63, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(369,N'External Task Force Request Refuse',N'رفض طلب إنتداب خارجى',0,1,63, 1 )

INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(370,N'External Task Force Request Cancel',N'الغاء طلب إنتداب خارجى',0,1,63, 1 )
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode],[RequestTypeCode],[HaveUserAccount]) VALUES(371,N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',0,1,63, 1 )

SET IDENTITY_INSERT [dbo].[EmailTemplateType] OFF


INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Task Force Request Sending',N'ارسال طلب إنتداب خارجى',367,N'ارسال',N'ارسال',1,NULL)

INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Task Force Request Accept',N'الموافقة على طلب إنتداب خارجى',368,N'الموافقة على',N'الموافقة على',1,NULL)

INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Task Force Request Refuse',N'رفض طلب إنتداب خارجى',369,N'رفض',N'رفض',1,NULL)

INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'External Task Force Request Cancel',N'الغاء طلب إنتداب خارجى',370,N'الغاء',N'الغاء',1,NULL)

INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',371,N'ارسال اشعار بعد نهاية المسار',N'ارسال اشعار بعد نهاية المسار',1,NULL)
Go



INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (809, NULL, NULL, N'ClientTaskForceRequest', N'SearchClientTaskForceRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (810, NULL, NULL, N'ClientTaskForceRequest', N'GetDetails', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (811, NULL, NULL, N'ClientTaskForceRequest', N'GetWithOutSigById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (812, NULL, NULL, N'ClientTaskForceRequest', N'Put', N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (813, NULL, NULL, N'ClientTaskForceRequest', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (814, NULL, NULL, N'ClientTaskForceRequest', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (815, NULL, NULL, N'ClientTaskForceRequest', N'Get', N'Get')
GO


INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1026, 809, 15408, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1027, 810, 15410, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1028, 811, 15410, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1029, 812, 15412, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1030, 813, 15412, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1031, 814, 15411, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1032, 815, 15410, NULL)
GO



INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(1018,N'External Task Force Request Signature',N'اعتماد طلب إنتداب خارجى',501,N'/WorkFlow/ClientTaskForceRequestSignature',N'Index','fa fa-thumb-tack',N'get',28,1,1)
Go

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

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15413,N'اعتماد طلب إنتداب خارجى',N'External Task Force Request Signature',1018,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15414,N'عرض اعتماد طلب إنتداب خارجى',N'View External Task Force Request Signature',1018,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15415,N'تعديل اعتماد طلب إنتداب خارجى',N'Edit External Task Force Request Signature',1018,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15416,N'حفظ اعتماد طلب إنتداب خارجى',N'Save External Task Force Request Signature',1018,2)

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

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

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

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


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1213,N'WorkFlow',N'ClientTaskForceRequestSignature',N'Index',0,N'get',15413)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1214,N'WorkFlow',N'ClientTaskForceRequestSignature',N'ClientTaskForceRequestSignature_Read',0,N'post',15414)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1215,N'WorkFlow',N'ClientTaskForceRequestSignature',N'Save',2,N'get',15415)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1216,N'WorkFlow',N'ClientTaskForceRequestSignature',N'Save',0,N'post',15416)
GO

 INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1033, 807, 15421, 63)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1034, 804, 15414, 63)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1035, 805, 15414, 63)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1036, 803, 15415, 63)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1037, 808, 15416, 63)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1038, 806, 15418, 63)
Go
-------------------------End 2023-09-14---------------------------

----------------------------14-9-2023  Negm --------------------------------


SET IDENTITY_INSERT [dbo].[MobileNotificationTypes] ON 

INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (185, N'Sending External Task Force Request', N'ارسال طلب إنتداب خارجى  ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (186, N'Accept External Task Force Request', N'الموافقه على  طلب إنتداب خارجى ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (187, N'Refuse External Task Force Request', N'رفض   طلب إنتداب خارجى  ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (188, N'Cancellation External Task Force Request', N'الغاء طلب إنتداب خارجى ')

SET IDENTITY_INSERT [dbo].[MobileNotificationTypes] OFF


SET IDENTITY_INSERT [dbo].[MobileNotificationTemplates] ON 
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (185, N'sending External Task Force', N'ارسال طلب إنتداب خارجى ', N'sending External Task Force', N'ارسال طلب إنتداب خارجى', 63, 185, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (186, N'Accept External Task Force ', N'الموافقه على طلب إنتداب خارجى', N'Accept External Task Force ', N'الموافقه على طلب إنتداب خارجى', 63, 186, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (187, N'Refuse External Task Force', N'رفض   طلب إنتداب خارجى', N'Refuse External Task Force', N'رفض   طلب إنتداب خارجى', 63, 187, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (188, N'Cancellation External Task Force', N'الغاء طلب إنتداب خارجى', N'Cancellation External Task Force', N'الغاء طلب إنتداب خارجى', 63, 188, NULL, NULL)

SET IDENTITY_INSERT [dbo].[MobileNotificationTemplates] OFF


SET IDENTITY_INSERT [dbo].[MobileNotificationTypes] ON 

INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (189, N'Sending Client Transfer Request', N'ارسال طلب نقل موظف خارجى  ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (190, N'Accept Client Transfer Request', N'الموافقه على طلب نقل موظف خارجى  ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (191, N'Refuse Client Transfer  Request', N'رفض   نقل موظف  خارجى  ')
INSERT [dbo].[MobileNotificationTypes] ([MobileNotificationTypeCode], [Name], [Arabic_Name]) VALUES (192, N'Cancellation Client Transfer  Request', N'الغاء طلب  نقل موظف  خارجى ')

SET IDENTITY_INSERT [dbo].[MobileNotificationTypes] OFF


SET IDENTITY_INSERT [dbo].[MobileNotificationTemplates] ON 
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (189, N'Sending Client Transfer Request ', N'طلب نقل موظف خارجى ', N'Sending Client Transfer Request', N' إرسال طلب نقل موظف خارجى', 62, 189, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (190, N'Accept Client Transfer Request', N'الموافقه على طلب نقل موظف خارجى', N'Accept Client Transfer Request ', N'الموافقه على طلب نقل موظف خارجى', 62, 190, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (191, N'Refuse Client Transfer  Request', N'رفض   نقل موظف  خارجى', N'Refuse Client Transfer  Request', N'رفض  طلب نقل موظف  خارجى', 62, 191, NULL, NULL)
INSERT [dbo].[MobileNotificationTemplates] ([MobileNotificationTemplateCode], [Title], [Arabic_Title], [Body], [Arabic_Body], [RequestTypeCode], [MobileNotificationTypeCode], [ModifiedBy], [ModificationDate])
VALUES (192, N'Cancellation Client Transfer  Request', N'الغاء طلب  نقل موظف  خارجى', N'Cancellation Client Transfer Request', N'الغاء طلب  نقل موظف  خارجى', 62, 192, NULL, NULL)
SET IDENTITY_INSERT [dbo].[MobileNotificationTemplates] OFF


------------------------------------------end -------------------------------
------------------------------------------Hammad 14-9-2023-------------------------------

CREATE TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequests](
	[MasterRequestCode] [int] IDENTITY(1,1) NOT NULL,
	[FromBranchCode] [int] NOT NULL,
	[ToBranchCode] [int] NOT NULL,
	[RequestTypeCode] [int] NOT NULL,
	[FromTrackCode] [int] NOT NULL,
	[ToTrackCode] [int] NOT NULL,
	[RequestDate] [datetime] NULL,
	[RequestDateHijri] [nvarchar](10) NULL,
	[MainType] [tinyint] NOT NULL,
	[DepartmentApproval] [tinyint] NOT NULL,
	[Notes] [nvarchar](max) NULL,
	[Canceled] [bit] NULL,
	[CancelRequestNumber] [int] NULL,
	[CreatedBy] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[CreationDateHijri] [nvarchar](10) NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModificationDate] [datetime] NULL,
	[ModificationDateHijri] [nvarchar](10) NULL,
	[EmployeeCode] [int] NULL,
	[CostCenter] [nvarchar](150) NULL,
	[IsSynced] [bit] NOT NULL,
	[MasterRequestNo] [int] NULL,
	[IsFromMobile] [bit] NOT NULL,
 CONSTRAINT [PK_ClientMasterRequests] PRIMARY KEY CLUSTERED 
(
	[MasterRequestCode] 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 [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ADD  CONSTRAINT [DF_WF_ClientMasterRequests_IsSynced]  DEFAULT ((0)) FOR [IsSynced]
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ADD  CONSTRAINT [DF_WF_ClientMasterRequests_IsFromMobile]  DEFAULT ((0)) FOR [IsFromMobile]
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequests]  WITH CHECK ADD  CONSTRAINT [FK_WF_ClientMasterRequests_WF_ClientMasterRequests_CancelRequestNumber] FOREIGN KEY([CancelRequestNumber])
REFERENCES [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ([MasterRequestCode])
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] CHECK CONSTRAINT [FK_WF_ClientMasterRequests_WF_ClientMasterRequests_CancelRequestNumber]
GO

CREATE TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsFiles](
	[MasterRequestFileCode] [int] IDENTITY(1,1) NOT NULL,
	[MasterRequestCode] [int] NOT NULL,
	[FileName] [nvarchar](500) NOT NULL,
	[FileType] [tinyint] NOT NULL,
 CONSTRAINT [PK_WF_ClientMasterRequestsFiles] PRIMARY KEY CLUSTERED 
(
	[MasterRequestFileCode] 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 [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsFiles] ADD  CONSTRAINT [DF_WF_ClientMasterRequestsFiles_FileType]  DEFAULT ((1)) FOR [FileType]
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsFiles]  WITH CHECK ADD  CONSTRAINT [FK_WF_ClientMasterRequestsFiles_WF_ClientMasterRequests] FOREIGN KEY([MasterRequestCode])
REFERENCES [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ([MasterRequestCode])
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsFiles] CHECK CONSTRAINT [FK_WF_ClientMasterRequestsFiles_WF_ClientMasterRequests]
GO

CREATE TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsSignature](
	[MasterRequestSignatureCode] [int] IDENTITY(1,1) NOT NULL,
	[MasterRequestCode] [int] NOT NULL,
	[BranchCode] [int] NOT NULL,
	[UserCode] [int] NOT NULL,
	[StepNumber] [int] NOT NULL,
	[Approved] [tinyint] NOT NULL,
	[SignatureDate] [datetime] NULL,
	[SignatureDateHijri] [nvarchar](10) NULL,
	[SignatureTime] [nvarchar](10) NULL,
	[SignatureComment] [nvarchar](500) NULL,
	[SignatureCommentInverse] [nvarchar](500) NULL,
	[Turn] [int] NULL,
	[OldUserCode] [int] NULL,
	[ChangedBy] [int] NULL,
	[ChangeDate] [datetime] NULL,
	[UserTypeCode] [int] NULL,
 CONSTRAINT [PK_WF_ClientMasterRequestsSignature] PRIMARY KEY CLUSTERED 
(
	[MasterRequestSignatureCode] 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 [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsSignature]  WITH CHECK ADD  CONSTRAINT [FK_WF_ClientMasterRequestsSignature_WF_ClientMasterRequests] FOREIGN KEY([MasterRequestCode])
REFERENCES [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ([MasterRequestCode])
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientMasterRequestsSignature] CHECK CONSTRAINT [FK_WF_ClientMasterRequestsSignature_WF_ClientMasterRequests]
GO

CREATE TABLE [SST.ERP_Client].[dbo].[WF_ClientTaskForceRequests](
	[MasterRequestCode] [int] NOT NULL,
	[PositionCode] [nvarchar](30) NOT NULL,
	[TaskForceFromDate] [datetime2](7) NOT NULL,
	[TaskForceToDate] [datetime2](7) NOT NULL,
	[SectionCode] [nvarchar](20) NULL,
	[DepartmentCode] [nvarchar](20) NULL,
	[Salary] [decimal](18, 2) NULL,
	[CurrencyCode] [tinyint] NULL,
 CONSTRAINT [PK_WF_ClientTaskForceRequests] PRIMARY KEY CLUSTERED 
(
	[MasterRequestCode] 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 [SST.ERP_Client].[dbo].[WF_ClientTaskForceRequests]  WITH CHECK ADD  CONSTRAINT [FK_ClientTaskForceRequest_WF_ClientMasterRequests] FOREIGN KEY([MasterRequestCode])
REFERENCES [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ([MasterRequestCode])
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientTaskForceRequests] CHECK CONSTRAINT [FK_ClientTaskForceRequest_WF_ClientMasterRequests]
GO

CREATE TABLE [SST.ERP_Client].[dbo].[WF_ClientTransferRequests](
	[MasterRequestCode] [int] NOT NULL,
	[PositionCode] [nvarchar](30) NOT NULL,
	[EffectiveTransferDate] [datetime2](7) NOT NULL,
	[SectionCode] [nvarchar](20) NULL,
	[DepartmentCode] [nvarchar](20) NULL,
	[Salary] [decimal](18, 2) NULL,
	[CurrencyCode] [tinyint] NULL,
 CONSTRAINT [PK_WF_ClientTransferRequests] PRIMARY KEY CLUSTERED 
(
	[MasterRequestCode] 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 [SST.ERP_Client].[dbo].[WF_ClientTransferRequests]  WITH CHECK ADD  CONSTRAINT [FK_ClientTransferRequest_WF_ClientMasterRequests] FOREIGN KEY([MasterRequestCode])
REFERENCES [SST.ERP_Client].[dbo].[WF_ClientMasterRequests] ([MasterRequestCode])
GO

ALTER TABLE [SST.ERP_Client].[dbo].[WF_ClientTransferRequests] CHECK CONSTRAINT [FK_ClientTransferRequest_WF_ClientMasterRequests]
GO


------------------------------------------