DELETE FROM adm_PermisosRoles WHERE IdObj = 'FRMADENTES'
GO
DELETE FROM dbo.Sys_Roles WHERE IdObj = 'FRMADENTES'
GO
DELETE FROM dbo.adm_Permisos where IdObj ='FRMADENTES'
GO
DELETE FROM dbo.Sys_ObjetosApp WHERE IdObj = 'FRMADENTES' AND IdGrupo = 'TESDOC' AND SubModulo ='TES'
GO
DROP TABLE dbo.Trn_TraEspAdendosDetalle
GO
DROP TABLE dbo.Trn_TraEspAdendosAnexo
GO
DROP TABLE dbo.Trn_TraEspAdendos
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[paWcfSeInsTrn_TraEspAdendos]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[paWcfSeInsTrn_TraEspAdendos]
GO
IF  EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'dataTypeTrn_TraEspAdendos' AND ss.name = N'dbo')
DROP TYPE [dbo].[dataTypeTrn_TraEspAdendos]
GO
IF  EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'dataTypeTrn_TraEspAdendosAnexo' AND ss.name = N'dbo')
DROP TYPE [dbo].[dataTypeTrn_TraEspAdendosAnexo]
GO
IF  EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'dataTypeTrn_TraEspAdendosDetalle' AND ss.name = N'dbo')
DROP TYPE [dbo].[dataTypeTrn_TraEspAdendosDetalle]
GO
DELETE FROM dbo.Sys_Roles WHERE IdObj = 'FRMTATIPAD'
GO
DELETE FROM dbo.adm_Permisos where IdObj ='FRMTATIPAD'
GO
DELETE FROM dbo.Sys_ObjetosApp WHERE IdObj = 'FRMTATIPAD' AND IdGrupo = 'TESCAT' AND SubModulo ='TES'
GO
DROP TABLE dbo.TiposAdendos
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[paWcfSeInsTiposAdendos]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[paWcfSeInsTiposAdendos]
GO
IF  EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'dataTypeTiposAdendos' AND ss.name = N'dbo')
DROP TYPE [dbo].[dataTypeTiposAdendos]
GO