Need user input on http://keralarealtors.net

Coordinator
Oct 29, 2007 at 4:20 PM
Please check out the sites staging server at http://keralarealtors.net and let me know the following.

1) sites performance
2) usability
3) issues/bugs/suggestions

We are also looking for more developers to join us in this open source endeavor. Even if ou can contribute an hour a week towards this project, that would be a big help.

Please contact us for more info on the project.

Coordinator
May 12, 2008 at 8:36 PM
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go



-- =============================================
-- Author:        <Eldos Kuriakose Paduthottathil>
-- Create date: <09/20/2007>
-- Description:    <...>
-- =============================================
ALTER PROCEDURE [dbo].[GetItems]
    @projectversionid uniqueidentifier,
    @ownerid uniqueidentifier,
    @statusid uniqueidentifier,
    @priorityid uniqueidentifier,
    @itemtypeid uniqueidentifier,
    @pagenumber int = 1,
    @pagesize int = 10,
    @sortby int = 0

AS
BEGIN
    --SET NOCOUNT ON;
    declare @statement nvarchar(2000)
    declare @lowerrowcount int
    declare @upperrowcount int
    set @lowerrowcount = (@pagenumber - 1) * @pagesize
    set @upperrowcount = @lowerrowcount + @pagesize
    set @statement = 'SELECT * FROM
    (    
      SELECT Items.*
      ,ROW_NUMBER() Over(order by '
      if(@sortby=0)
      begin
        set @statement = @statement + ' WhenWho.CreateDate desc '
      end


    set @statement = @statement + ') as Row_Num
      ,Count(Items.ID) over() as Row_Count
    FROM Items
    left outer join WhenWho on Items.ID = WhenWho.ID
    where Items.ProjectVersionID = convert(uniqueidentifier,''{' + convert(nvarchar(36),@projectversionid) + '}'')  '
    if(@ownerid is not null)
    begin
        set @statement = @statement + 'And Items.OwnerID = convert(uniqueidentifier,''{' + convert(nvarchar(36),@ownerid) + '}'')  '
    end
    if(@statusid is not null)
    begin
        set @statement = @statement + 'And Items.StatusID = convert(uniqueidentifier,''{' + convert(nvarchar(36),@statusid) + '}'')  '
    end
    if(@priorityid is not null)
    begin
        set @statement = @statement + 'And Items.PriorityID = convert(uniqueidentifier,''{' + convert(nvarchar(36),@priorityid) + '}'')  '
    end
    if(@itemtypeid is not null)
    begin
        set @statement = @statement + 'And Items.TypeID = convert(uniqueidentifier,''{' + convert(nvarchar(36),@itemtypeid) + '}'')  '
    end
set @statement = @statement + '
) As BaseTable
where Row_Num > ' + convert(nvarchar(10), @lowerrowcount) + ' And Row_Num <= ' + convert(varchar(10),@upperrowcount)
--PRINT @statement
exec sp_executesql @statement

END