⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 03.01.05.sqldataprovider

📁 Module articles for Dot Net Nuke 3.x.x , 4.x.x
💻 SQLDATAPROVIDER
字号:
/***** ARTICLES 3.1.5 SCRIPT *****/
/* Changes Text to nText for International support */

if exists (select * from sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}Articles_AddArticle') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}{objectQualifier}Articles_AddArticle
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}Articles_AddArticle

	@PortalId	int,
	@ModuleId	int,
	@CategoryId	int,
	@UserId		int,
	@Title		nvarchar(150),
	@Description	nvarchar(2000),
	@Authed		bit,
	@Featured	bit,
	@Article	ntext,
	@ImageFIle	nvarchar(200),
	@PublishDate	datetime,
	@ExpireDate	datetime

AS

INSERT INTO
	{databaseOwner}{objectQualifier}Article(
		PortalId,
		ModuleId,
		CategoryId,
		UserId,
		CreatedDate,
		Title,
		Description,
		Authed,
		Featured,
		Article,
		ImageFile,
		PublishDate,
		ExpireDate
	)
VALUES
	(
	@PortalId,
	@ModuleId,
	@CategoryId,
	@UserId,
	GetDate(),
	@Title,
	@Description,
	@Authed,
	@Featured,
	@Article,
	@ImageFile,
	@PublishDate,
	@ExpireDate
	)

GO

/***************************************************************************/
if exists (select * from sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}Articles_UpdateArticle') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure {databaseOwner}{objectQualifier}Articles_UpdateArticle
GO

CREATE  PROCEDURE {databaseOwner}{objectQualifier}Articles_UpdateArticle

	@ItemId		int,
	@CategoryId	int,
	@UserId		int,
	@Title		nvarchar(150),
	@Description	nvarchar(2000),
	@Authed		bit,
	@Featured 	bit,
	@Article	ntext,
	@ImageFIle	nvarchar(200),
	@PublishDate	datetime,
	@ExpireDate	datetime
AS
UPDATE
	{databaseOwner}{objectQualifier}Article
SET
	CategoryId = @CategoryId,
	UserId = @UserId,
	LastModifiedDate = GetDate(),
	Title = @Title,
	Description = @Description,
	Authed = @Authed,
	Featured = @Featured,
	Article = @Article,
	ImageFile = @ImageFile,
	PublishDate = @PublishDate,
	ExpireDate = @ExpireDate
WHERE
	ItemId = @ItemId
GO

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -