Click here to Skip to main content
15,884,962 members
Articles / Programming Languages / C#

Genesis Hybrid Smart Client Framework part III

Rate me:
Please Sign up or sign in to vote.
4.29/5 (10 votes)
19 Jun 2009Ms-PL10 min read 34K   7  
This is part III of a VII part series. This article covers the back-end of the Genesis Smart Client Framework including the database design.
��USE [BlueMarble.Genesis.Dev]



/****** Object:  StoredProcedure [dbo].[Module_Ribbon_Find]    Script Date: 05/20/2009 22:37:07 ******/

SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER ON

GO

/*

----------------------------------------------------------------------------------------------------

-- Date Created: 20 May 2007



-- Created By: Eliyahu Business Systems (http://www.eliyahu.co.za)

-- Purpose: Finds records in the Module_Ribbon table passing nullable parameters

----------------------------------------------------------------------------------------------------

*/





CREATE PROCEDURE [dbo].[Module_Ribbon_Find]

(



	@SearchUsingOR bit   = null ,



	@RibbonGuid uniqueidentifier   = null ,



	@RibbonId int   = null ,



	@ApplicationGuid uniqueidentifier   = null ,



	@RibbonName nvarchar (50)  = null ,



	@RibbonOrder int   = null 

)

AS





				

  IF ISNULL(@SearchUsingOR, 0) <> 1

  BEGIN

    SELECT

	  [RibbonGuid]

	, [RibbonId]

	, [ApplicationGuid]

	, [RibbonName]

	, [RibbonOrder]

    FROM

	dbo.[Module_Ribbon]

    WHERE 

	 ([RibbonGuid] = @RibbonGuid OR @RibbonGuid is null)

	AND ([RibbonId] = @RibbonId OR @RibbonId is null)

	AND ([ApplicationGuid] = @ApplicationGuid OR @ApplicationGuid is null)

	AND ([RibbonName] = @RibbonName OR @RibbonName is null)

	AND ([RibbonOrder] = @RibbonOrder OR @RibbonOrder is null)

						

  END

  ELSE

  BEGIN

    SELECT

	  [RibbonGuid]

	, [RibbonId]

	, [ApplicationGuid]

	, [RibbonName]

	, [RibbonOrder]

    FROM

	dbo.[Module_Ribbon]

    WHERE 

	 ([RibbonGuid] = @RibbonGuid AND @RibbonGuid is not null)

	OR ([RibbonId] = @RibbonId AND @RibbonId is not null)

	OR ([ApplicationGuid] = @ApplicationGuid AND @ApplicationGuid is not null)

	OR ([RibbonName] = @RibbonName AND @RibbonName is not null)

	OR ([RibbonOrder] = @RibbonOrder AND @RibbonOrder is not null)

	Select @@ROWCOUNT			

  END

GO

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
We Fix Code
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions