My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 870: Fullcalendar not work right in Sight Day and Week view
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Apr 2011


Sign in to add a comment
 
Reported by erivaldo...@gtempaccount.com, Mar 26, 2011
Dear, I need help.
My fullCalendar is not working right.
When I'm in the last vision he displays the data correctly.
 
But when I'm in week view or day view, it does not show the data.

 
Below is my events:

events: function (start, end, callback) {
    $.ajax
    (
        {
        url: "Handler_Reserva.ashx?assessorIds=" + $get("ddl_Reserva_Tipo").value + "&StartTime=" + start.format("dd/MM/yyyy") + "&endTime=" + end.format("dd/MM/yyyy"),
        success: function (data) 
            {
            callback(data);
            }
        }
    );
}





and further down my Handler class.


<%@ WebHandler Language="VB" Class="Handler_Reserva" %>

Imports System
Imports System.Web
Imports BLL
Imports System.Data

Public Class Handler_Reserva : Implements IHttpHandler
    
    Enum Objeto_Reserva_Tipo
        Sala = 4
        Equipamento = 5
    End Enum
    
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        context.Response.ContentType = "application/json"
        context.Response.Write(GetCalendarData(context.Request.QueryString("assessorIds"), _
                               context.Request.QueryString("startTime"), _
                               context.Request.QueryString("endTime")))
                

    End Sub

    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return False
        End Get
    End Property

    
    Public Function GetCalendarData(ByVal Objeto_Reserva_ID As String, ByVal startString As String, ByVal endString As String) As String
        Dim Bus_Reserva As Reserva_Bus
        Bus_Reserva = New Reserva_Bus

        Dim ds As New DataSet
        Dim dt As New DataTable
        dt = Bus_Reserva.Consultar_Reservas(Objeto_Reserva_Tipo.Sala, Objeto_Reserva_ID, CType(startString, DateTime), CType(endString, DateTime))
        ds.Tables.Add(dt)
        Return DStoJSON(ds)
    End Function

    Public Shared Function DStoJSON(ByVal ds As DataSet) As String
        Dim json As New StringBuilder()
        json.Append("[")
        Dim rRow As Integer = 0
        For Each dr As DataRow In ds.Tables(0).Rows
            json.Append("{")
            Dim i As Integer = 0
            Dim colcount As Integer = dr.Table.Columns.Count
            For Each dc As DataColumn In dr.Table.Columns
                json.Append("""")
                json.Append(dc.ColumnName)
                json.Append(""":""")
                json.Append(dr(dc))
                json.Append("""")
                i += 1
                If i < colcount Then
                    json.Append(",")
                End If
            Next
            json.Append("}")
            rRow += 1
            If Not (rRow = ds.Tables(0).Rows.Count) Then
                json.Append(",")
            End If
            
        Next
        json.Append("]")
        Return json.ToString.Substring(0, json.Length)
    End Function

    
End Class




fullcalendar.docx
95.6 KB   Download
Apr 2, 2011
Project Member #1 adamrs...@gmail.com
hi erivaldo,
this site is for tracking bugs/feature-requests, not for providing support for people's individual problems with their projects. sorry.
adam
Status: Done
Sign in to add a comment

Powered by Google Project Hosting