书上P436页
打包文件夹内会有2个 SqlDataProvider文件
1.01.00.00.SqlDataProvider
2. 模块名.SqlDataProvider
1.是放所有的数据库操作 比如 建表 PROC 函数 之类的
2.是更新DNN数据库的数据 如ModuleControls表,一个页面就加一个
@ModuleName = N'Qa',
@FolderName = N'Qa',
@FriendlyName = N'Qa',
@Description = N'Qa',
@Version = N'01.00.00',
@IsPremium = 0,
@IsAdmin = 0,
@BusinessController = N'',
@SupportedFeatures = 3,
@CompatibleVersions=N'this Qa will update.',
@Dependencies=N'', --补上去的
@Permissions=N'' --补上去的
declare @DesktopModuleId int
select @DesktopModuleId = DesktopModuleId
from {databaseOwner}[{objectQualifier}DesktopModules]
where ModuleName = 'Qa'
exec {databaseOwner}[{objectQualifier}AddModuleDefinition] @DesktopModuleId,
@FriendlyName = N'Qa',
@DefaultCacheTime = 0
declare @ModuleDefID int
select @ModuleDefID = ModuleDefID
from {databaseOwner}[{objectQualifier}ModuleDefinitions]
where FriendlyName = 'Qa'
exec {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = NULL,
@ControlTitle = NULL,
@ControlSrc = N'DesktopModules/Qa/ViewQa.ascx',
@IconFile = NULL,
@ControlType = 0,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering=0 --补上去的
DNN文件示例