usp_ActiveDirectoryInfo_GetDis
playN
ameForService
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--
=============================================
-- Author: Insus.NET
-- Create date: 2013-03-28
-- Description: Get dissplay name form web service
-- =============================================
CREATE
PROCEDURE [dbo].[usp_ActiveDirectoryInfo_GetDisplayNameForService]
(
@PrefixText NV
ArchAR(MAX),
@Count INT
)
AS
DECLARE @W N
VARCHAR(MAX) = @PrefixText + '%'
EXECUTE('SELECT TOP (' + @Count + ') [displayName]
From [dbo].[ActiveDirectoryInfo] WHERE [displayName] LIKE ''' + @w +'''')
using
System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
/// <summary>
/// Summary description for ActiveDirectoryInfo
/// </summary>
namespace Insus.NET
{
p
ublic class ActiveDirectoryInfo
{
BusinessBase objBusinessBase = new BusinessBase();
public ActiveDirectoryInfo()
{
//
// TODO: Add constructor
LOGic here
//
}
public DataTable GetDisplayName(string prefixText,int count)
{
Parameter[] parameter = {
new Parameter ("@PrefixText",SqlD
BType.NVarChar,-1,prefixText),
new Parameter ("@Count",SqlDbType.Int,4,count)
};
return objBusinessBase.GetDataToDataSet("usp_ActiveDirectoryInfo_GetDisplayNameByPrefixText", parameter).Tables[0];
}
}
}