﻿----------------------------------Ali 11-01-2024 -------------------------------------------------------------------------------
ALTER TABLE dbo.WF_TaskForceRequest
	DROP CONSTRAINT FK_WF_AssignmentRequest_WF_MasterRequests
GO

ALTER TABLE dbo.WF_TaskForceRequest ADD CONSTRAINT
	FK_WF_TaskForceRequest_WF_MasterRequests FOREIGN KEY
	(
	MasterRequestCode
	) REFERENCES dbo.WF_MasterRequests
	(
	MasterRequestCode
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO


SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPoints] ON 
Go
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (947, NULL, NULL, N'TaskForceRequest', N'SearchTaskForceRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (948, NULL, NULL, N'TaskForceRequest', N'GetDetails', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (949, NULL, NULL, N'TaskForceRequest', N'GetWithOutSigById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (950, NULL, NULL, N'TaskForceRequest', N'Get', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (951, NULL, NULL, N'TaskForceRequest', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (952, NULL, NULL, N'TaskForceRequest', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (953, NULL, NULL, N'TaskForceRequest', N'Put', N'Put')
SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPoints] OFF
GO

SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ON 
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1224, 947, 15229, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1225, 948, 15229, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1226, 949 ,15231, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1227, 950, 15231, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1228, 951, 15232, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1229, 952, 15233, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1230, 953, 15233, 54)
GO

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1433,N'WorkFlow',N'TaskForceRequest',N'Index',0,N'get',15228)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1434,N'WorkFlow',N'TaskForceRequest',N'TaskForceRequest_Read',0,N'post',15229)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1435,N'WorkFlow',N'TaskForceRequest',N'Save',1,N'get',15230)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1436,N'WorkFlow',N'TaskForceRequest',N'Save',2,N'get',15231)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1437,N'WorkFlow',N'TaskForceRequest',N'Delete',0,N'post',15232)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1438,N'WorkFlow',N'TaskForceRequest',N'Save',0,N'post',15233)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1439,N'WorkFlow',N'TaskForceRequest',N'Cancel',0,N'post',15233)
Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1440,N'WorkFlow',N'TaskForceRequestSignature',N'Index',0,N'get',15352)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1441,N'WorkFlow',N'TaskForceRequestSignature',N'TaskForceRequestSignature_Read',0,N'post',15353)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1442,N'WorkFlow',N'TaskForceRequestSignature',N'Save',2,N'get',15354)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1443,N'WorkFlow',N'TaskForceRequestSignature',N'Save',0,N'post',15355)
GO
 INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1237, 12, 15242, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1238, 9, 15235, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1239, 10, 15235, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1240, 8, 15236, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1241, 13, 15237, 54)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1242, 11, 15239, 54)

Go



----------------------------------End 11-01-2024 -------------------------------------------------------------------------------
----------------------------------Ali 11-01-2024 -------------------------------------------------------------------------------
INSERT [dbo].[ConfigParameter] ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId], [ConfigDescription]) 
VALUES (N'Wf_RequestDateDependsOnBeginningAndEndMonth', N'Request Date depends on beginning and end month', N'تاريخ الطلب  يعتمد على فترة بداية ونهاية الشهر', N'false', 2, 3, 1, 1, NULL, NULL, 27, N'تحديد تاريخ الطلب بناءا على فترة بداية ونهاية الشهر')
Go
----------------------------------End 11-01-2024 -------------------------------------------------------------------------------

---------------------------------------------Negm 11-01-2024 --------------------------------------------------------------------

CREATE TABLE [dbo].[FingerAreaProjects](
	[FingerAreaProjectsCode] [int] IDENTITY(1,1) NOT NULL,
	[ArabicName] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[IsActive] [bit] NOT NULL,
	[CostCenterCode] nvarchar(150) NOT NULL,
	[FingerAreaCode] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[ModificationDate] [datetime]  NULL,
	[ModifiedBy] [int]  NULL,
 CONSTRAINT [PK_FingerAreaProjects] PRIMARY KEY CLUSTERED 
(
	[FingerAreaProjectsCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO


ALTER TABLE [dbo].[FingerAreaProjects]  WITH CHECK ADD  CONSTRAINT [FK_FingerAreaProjects_FingerArea] FOREIGN KEY([FingerAreaCode])
REFERENCES [dbo].[FingerArea] ([FingerAreaCode])
GO

ALTER TABLE [dbo].[FingerAreaProjects] CHECK CONSTRAINT [FK_FingerAreaProjects_FingerArea]
GO

ALTER TABLE [dbo].[FingerAreaProjects]  WITH CHECK ADD  CONSTRAINT [FK_FingerAreaProjects_CostCenter] FOREIGN KEY([CostCenterCode])
REFERENCES [dbo].[CostCenter] ([CostCenter])
GO

ALTER TABLE [dbo].[FingerAreaProjects] CHECK CONSTRAINT [FK_FingerAreaProjects_CostCenter]
GO
---------------------------------------------------- End  11-01-2024 ------------------------------------------------------------------------