INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('Test', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [id]

      ,[ConnName]

      ,[ConnUrl]

      ,[DataSourceName]

      ,[UserName]

      ,[Password]

      ,[IsSavePwd]

      ,[ServerIP]

  FROM [MES].[dbo].[sys_DataSource]', 'Server=.;Database=mes;User Id = sa; Password=123456;Connect Timeout = 2', 'mes数据源'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('Test1', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [id]

      ,[ConnName]

      ,[ConnUrl]

      ,[DataSourceName]

      ,[UserName]

      ,[Password]

      ,[IsSavePwd]

      ,[ServerIP]

  FROM [MES].[dbo].[sys_DataSource]', 'Server=.;Database=test;User Id = sa; Password=123456;Connect Timeout = 2', 'TEST123'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('Test9', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [id]

      ,[ConnName]

      ,[ConnUrl]

      ,[DataSourceName]

      ,[UserName]

      ,[Password]

      ,[IsSavePwd]

      ,[ServerIP]

  FROM [MES].[dbo].[sys_DataSource]', 'Server=.;Database=mes;User Id = sa; Password=123456;Connect Timeout = 2;', 'mes数据源'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('部门', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [id] ID

      ,[pid] PID

      ,[name] Name

      

  FROM [winformdevfarme].[dbo].[sysDept]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('菜单tree', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [ID]

      ,[PID]

      ,[Name]

     

  FROM [winformdevfarme].[dbo].[sysMenu]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('功能按钮', 'SELECT  [id] ID

      ,[name] Name

  FROM [winformdevfarme].[dbo].[sysDictType] where pid=10', 'Server=.;Database=mes;User Id = sa; Password=123456;Connect Timeout = 2', 'mes数据源'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('角色功能', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT  [id] ID

      ,[pid] PID

      ,[name] Name

  FROM [winformdevfarme].[dbo].[sysFunction]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('用户', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT TOP 1000 [ID]

      

      ,[userName] Name

      

  FROM [winformdevfarme].[dbo].[sysuser]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('用户-角色', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT account,

       id,

       deptId

      ,[username] 

      

  FROM [winformdevfarme].[dbo].[sysuser]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
INSERT INTO [sysDataTable]([DataTableName], [DataTableSql], [DataTableUrl], [DataSourceName]) VALUES ('字典类型', '/****** Script for SelectTopNRows command from SSMS  ******/

SELECT [ID]

      ,[PID]

      ,[Name]

     

  FROM [winformdevfarme].[dbo].[sysDictType]', 'Server=.;Database=winformdevfarme;User Id = sa; Password=123456;Connect Timeout = 2', 'localhost'); GO
