ALTER proc [dbo].[GetTotalDataByIp] @cntid int, @checkid int as begin SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SET NOCOUNT ON; If(@checkid = 1) begin SELECT top(24) LocationName, COUNT(LocationName) AS TotalCount FROM Job WITH (NOLOCK) where CountryId = @cntid and LocationName !=' ' and LocationName !='???' GROUP BY LocationName ORDER BY TotalCount DESC end else if(@checkid = 2) begin SELECT top(16) CompanyName, COUNT(CompanyName) AS TotalCount FROM Job WITH (NOLOCK) where CountryId = @cntid and CompanyName != ' ' and isactive=1 GROUP BY CompanyName ORDER BY TotalCount DESC end end
int getcountry=108; var getlocationbyip = dc.GetTotalDataByIp(getcountry, 1); if (getlocationbyip != null) { rptgetlocations.DataSource = getlocationbyip; rptgetlocations.DataBind(); } //var getcompaniesbyip = dc.getcompaniesbyip(getcountry); var getcompaniesbyip = dc.GetTotalDataByIp(getcountry, 2); if (getcompaniesbyip != null) { rptcompanies.DataSource = getcompaniesbyip; rptcompanies.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)