4pm BackUP -- Sharing Room List

  strOutput.AppendFormat("<tr>")
            strOutput.AppendFormat("<td colspan='5'> </td>")
            strOutput.AppendFormat("</tr>")

            'Room-only Let
           If iHouseSharingAvailable <> "0" Or iHouseSharingSold <> "0" Or iHouseSharingExpired <> "0" Or _
             iHouseSharingPending <> "0" Then

                strOutput.AppendFormat("<tr>")
                strOutput.AppendFormat("<td width='20%'><div class='bodyTextBold'>Room-only Let</div></td>")
                strOutput.AppendFormat("<td width='20%'><div class='bodyTextBold' align='center'>Available <a href=" & Quote & "javascript:load('Help.aspx?q=h1');" & Quote & " class='helpLink'>?</a></div></td>")
                strOutput.AppendFormat("<td width='20%'><div class='bodyTextBold' align='center'>Offline <a href=" & Quote & "javascript:load('Help.aspx?q=h2');" & Quote & " class='helpLink'>?</a></div></td>")
                strOutput.AppendFormat("<td width='20%'><div class='bodyTextBold' align='center'>Expired <a href=" & Quote & "javascript:load('Help.aspx?q=h3');" & Quote & " class='helpLink'>?</a></div></td>")
                strOutput.AppendFormat("<td width='20%'><div class='bodyTextBold' align='center'>Pending <a href=" & Quote & "javascript:load('Help.aspx?q=h4');" & Quote & " class='helpLink'>?</a></div></td>")
                strOutput.AppendFormat("</tr>")
            End If

            If iHouseSharingAvailable <> "0" Or iHouseSharingSold <> "0" Or iHouseSharingExpired <> "0" Or _
            iHouseSharingPending <> "0" Then

                strOutput.AppendFormat("<tr>")
                strOutput.AppendFormat("<td><div class='bodyText' style='margin-left:10px;'>House Sharing</div></td>")
                strOutput.AppendFormat("<td><div class='bodyText' align='center'>" & iHouseSharingAvailable & "</div></td>")
                strOutput.AppendFormat("<td><div class='bodyText' align='center'>" & iHouseSharingSold & "</div></td>")
                strOutput.AppendFormat("<td><div class='bodyText' align='center'>" & iHouseSharingExpired & "</div></td>")
                strOutput.AppendFormat("<td><div class='bodyText' align='center'>" & iHouseSharingPending & "</div></td>")
                strOutput.AppendFormat("</tr>")
            End If

Main.aspx.vb

761

parking let



522

'Clean up
        objDSet.Dispose()

   '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
        Dim iLetCategoryCount, iLetCategory As Integer

        Dim iHouseSharingAvailable As String = "0"
        Dim iHouseSharingSold As String = "0"
        Dim iHouseSharingExpired As String = "0"
        Dim iHouseSharingPending As String = "0"



        'Retrieve details from database
        Dim objDSet1 As DataSet = gGetLetCategoryCountFromUserID(objFormsId.Ticket.UserData)

        For i As Integer = 0 To objDSet1.Tables(0).Rows.Count - 1

            'Declare new row
            Dim rRow As DataRow = objDSet1.Tables(0).Rows(i)

            'Flag that there are properties for this user
            bPropertiesExist = True

            iLetCategoryCount = rRow("LetCategoryCount")
            iLetCategory = rRow("idLetCategory")
            iCRule = rRow("idCRule")

            Select Case iLetCategory

                Case gHouseSharing
                    If iCRule = gPublishedOnline Then iHouseSharingAvailable = "<a href='ListOutput2.aspx?lc=" & gHouseSharing & "&cr=" & gPublishedOnline & "'>" & iLetCategoryCount & "</a>"
                    If iCRule = gArchivedOffline Then iHouseSharingSold = "<a href='ListOutput2.aspx?lc=" & gHouseSharing & "&cr=" & gArchivedOffline & "'>" & iLetCategoryCount & "</a>"
                    If iCRule = gExpired Then iHouseSharingExpired = "<a href='ListOutput2.aspx?lc=" & gHouseSharing & "&cr=" & gExpired & "'>" & iLetCategoryCount & "</a>"
                    If iCRule = gPendingReview Then iHouseSharingPending = "<a href='ListOutput2.aspx?lc=" & gHouseSharing & "&cr=" & gPendingReview & "'>" & iLetCategoryCount & "</a>"

            End Select
        Next

        'Clean up
        objDSet1.Dispose()




        '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&




Listoutput2.aspx.vb


576


'---------------------
        'Search for properties
        '---------------------
        Dim objDSet As DataSet = Nothing
        Dim result As List(Of DAL.findahome.Property) = dc.Properties _
                                                        .Where _
                                                        (
                                                            Function(c) (QueryCRule = 0 OrElse c.idCRule = QueryCRule) _
                                                                And c.idCreatedBy = objFormsId.Ticket.UserData _
                                                        ).ToList()
        If Not String.IsNullOrEmpty(QueryLetter) Then
            result = result.Where(Function(c) c.District.DistrictName.Substring(1, 1) = QueryLetter).ToList()
        End If


        If QueryLetCategory.Equals(2) Then  ' ### If the LetCategory is shared room

            result = result.Where(Function(c) c.LetCategoryLists.Any(Function(d) QueryLetCategory = 0 OrElse d.idLetCategory.Equals(QueryLetCategory))).ToList()

        Else  ' ###  Without any LetCategory

            Select Case cg_SessionUserType
                Case gAgent
                    'Retrieving New Developments brochures
                    If QueryPropMarket = gNewDevMarket Or QueryPropMarket = gIndNewDevMarket Then
                        'objDSet = gGetAgentNewDevList(QueryPropMarket, QueryCRule, objFormsId.Ticket.UserData, QueryLetter)

                        result = result.Where(Function(c) c.idPropMarket = QueryPropMarket).ToList()
                    Else
                        'PJF - 02 Dec 2008 - Adding search by Query
                        If Query <> "" Then
                            'objDSet = gGetPropertyListByQuery(objFormsId.Ticket.UserData, Query, QueryLetter)

                            result = result.Where(
                                                    Function(c) (c.AddressLine1.Contains(Query) _
                                                        OrElse c.AddressLine2.Contains(Query) _
                                                        OrElse c.DisplayAddress.Contains(Query) _
                                                        OrElse c.Description.Contains(Query) _
                                                        OrElse c.District.DistrictName.Contains(Query) _
                                                        OrElse c.CountyCity.CountyCityName.Contains(Query)) _
                                                        AndAlso (c.PropertyPictures.Count = 0 OrElse c.PropertyPictures.Any(Function(d) d.Thumbnail = 1))
                                                 ).ToList()
                        Else
                            'objDSet = gGetAgentPropertyList(QueryPropMarket, QueryCRule, objFormsId.Ticket.UserData, QueryLetter)

                            result = result.Where(Function(c) c.idPropMarket = QueryPropMarket).ToList()
                        End If
                    End If
                Case gCollegeAgent
                    'objDSet = gGetCollegePropertyList(QueryLetCategory, QueryCRule, objFormsId.Ticket.UserData, QueryLetter, QueryFolder)

                    result = result.Where(
                                            Function(c) c.Property_Tags.Any(Function(d) QueryFolder = 0 OrElse (d.Tag_Id = QueryFolder AndAlso d.Tag.Type = DAL.findahome.Tag.Types.Folder)) _
                                                AndAlso c.LetCategoryLists.Any(Function(d) QueryLetCategory = 0 OrElse d.idLetCategory = QueryLetCategory) _
                                                AndAlso (c.PropertyPictures.Count = 0 OrElse c.PropertyPictures.Any(Function(d) d.Thumbnail = 1))
                                         ).ToList()

            End Select

        End If

        result = SortProperties(result, sorter)


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章