USE [HelpDesk02_Def]
GO


/***  TASKS   ***/
IF NOT EXISTS( SELECT * FROM [dbo].[tblSystemLayouts] WHERE nID=14 )
BEGIN
	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 0, NULL, 1, 787);
		
	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 20,'Name', 2, 789);

	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 10, 'Assignee', 3, 791);

	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 8, 'Status', 4, 786);

	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 7, 'Due Date', 5, 781);

	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 7, 'Start Date', 6, 792);
		
	INSERT [dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) 
		VALUES (14, N'Left', 5, 'Time Spent', 7, 794);
		
END

-- Remove Time fields from default layouts	
DELETE FROM tblSystemLayouts where nDtsFieldID in (8, 10, 3);

GO

