USE [Configuration02_Def]
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=1)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (1, 0, N'Hide Tabs By Type', N'Hide Tabs By Type', N'%Value0%-%Value1%', N'tblWrk_Hide_Tabs_By_Type_1', 64, 1, 1, N'', NULL, 0, 1)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=2)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (2, 1, N'New Rule (2)', N'<Empty>-', N'%Value0%-%Value1%', N'tblWrk_Hide_Tabs_By_Type_1', 64, 1, 1, N'', NULL, 0, 1)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=3)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (3, 1, N'New Rule (3)', N'Setting-', N'%Value0%-%Value1%', N'tblWrk_Hide_Tabs_By_Type_1', 64, 1, 1, N'', NULL, 0, 1)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=5)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (5, 0, N'Hide Fields By Type', N'Hide Fields By Type', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Type_5', 64, 1, 1, N'', NULL, 0, 2)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=6)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (6, 5, N'New Rule (6)', N'<Empty>-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Type_5', 64, 1, 1, N'', NULL, 0, 2)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=7)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (7, 5, N'New Rule (7)', N'Import Rule-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Type_5', 64, 1, 1, N'', NULL, 0, 2)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=8)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (8, 0, N'Show Advanced Fields', N'Show Advanced Fields', N'%Value0%-%Value1%', N'tblWrk_Show_Advanced_Fields_8', 64, 1, 1, N'', NULL, 0, 3)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblRule] WHERE nID=9)
	INSERT [dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) 
	VALUES (9, 8, N'New Rule (9)', N'No-', N'%Value0%-%Value1%', N'tblWrk_Show_Advanced_Fields_8', 64, 1, 1, N'', NULL, 0, 3)
GO
