hola a todos
desde anoche estoy viendo la posibilidad de poder traer los calendarios de google calendar a mi pagina web a través de la api de google calendar.
me he topado con un problema y este es que no encuentro las fechas del evento....
¿desde donde y como extraigo este dato?
les comparto el codigo...
Código HTML:
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myService As New CalendarService("exampleCo-exampleApp-2")
myService.setUserCredentials("[email protected]", "password")
Dim query As New EventQuery()
Dim direccion As String = cboCalendarios.SelectedValue
direccion = direccion.Replace("%40", "@")
query.Uri = New Uri(direccion)
query.StartTime = New DateTime(2008, 1, 1)
query.EndTime = New DateTime(2008, 12, 31)
query.Query = "peinado"
Dim newDt As New DataTable()
Dim colNombre As DataColumn = New DataColumn("nombre")
colNombre.DataType = System.Type.GetType("System.String")
newDt.Columns.Add(colNombre)
Dim colFechaDesde As DataColumn = New DataColumn("fecha_desde")
colFechaDesde.DataType = System.Type.GetType("System.DateTime")
newDt.Columns.Add(colFechaDesde)
Dim colFechaHasta As DataColumn = New DataColumn("fecha_hasta")
colFechaHasta.DataType = System.Type.GetType("System.DateTime")
newDt.Columns.Add(colFechaHasta)
Dim colHoraDesde As DataColumn = New DataColumn("hora_desde")
colHoraDesde.DataType = System.Type.GetType("System.DateTime")
newDt.Columns.Add(colHoraDesde)
Dim colHoraHasta As DataColumn = New DataColumn("hora_hasta")
colHoraHasta.DataType = System.Type.GetType("System.DateTime")
newDt.Columns.Add(colHoraHasta)
Dim colComentario As DataColumn = New DataColumn("comentario")
colComentario.DataType = System.Type.GetType("System.String")
newDt.Columns.Add(colComentario)
Dim colAutor As DataColumn = New DataColumn("autor")
colAutor.DataType = System.Type.GetType("System.String")
newDt.Columns.Add(colAutor)
Dim colLink As DataColumn = New DataColumn("link")
colLink.DataType = System.Type.GetType("System.String")
newDt.Columns.Add(colLink)
Dim myNewRow As DataRow
Dim i As Integer
Dim calFeed As EventFeed = myService.Query(query)
For i = 0 To calFeed.Entries.Count - 1
Dim firstMatchEntry As AtomEntry = calFeed.Entries(i)
myNewRow = newDt.NewRow()
myNewRow(0) = firstMatchEntry.Title.Text
'myNewRow(1) = firstMatchEntry.Content.Src
'myNewRow("BooleanCol") = True
'myNewRow("TimeSpanCol") = New TimeSpan(10, 22, 10, 15, 100)
'myNewRow(5) = calFeed.BatchDat
myNewRow(6) = firstMatchEntry.Authors.Item(0).Name
myNewRow(7) = firstMatchEntry.SelfUri.Content.ToString
newDt.Rows.Add(myNewRow)
Next
GridView1.DataSource = newDt
GridView1.DataBind()
End Sub