First of all I have no problem to add Iteams my using atomEntry.
Simple, I can add iteams at the current date and time. But I want to
write my own date! Can I use AtomEntry? or is EventEntry better?
EventEntry entry2 = new EventEntry();
AtomEntry entry = new AtomEntry(); //new item
//Reminder
Reminder rem = new Reminder();
rem.Hours = 1;
entry2.Reminder = rem;
//Date
DateTime startTime =
DateTime.Parse("2006-06-05T15:00:00-08:00");
DateTime endTime =
DateTime.Parse("2006-06-07T17:00:00-08:00");
When eventTimes = new When();
eventTimes.StartTime = startTime;
eventTimes.EndTime = endTime;
entry2.Times.Add(eventTimes);
//Information
AtomPerson author = new
AtomPerson(AtomPersonType.Author);
author.Name = CalenderHashTable[0].ToString();
author.Email = CalenderHashTable[1].ToString();
entry2.Authors.Add(author);
entry2.Title.Text = CalenderHashTable[2].ToString();
entry2.Content.Content =
CalenderHashTable[3].ToString();
Uri postUri = new
Uri("http://www.google.com/calendar/feeds/[EMAIL PROTECTED]/private/full");
try
{
AtomEntry insert = service.Insert(postUri, entry2);
session.send("Adding your data.");
}
catch (Exception ee)
{
Console.WriteLine("Error: " + ee);
}
The code has two entry, one from EntryEvent and another from AtomEntry.
AtomEntry is ok, but I tried to add time with EntryEvent, with no
success. Can I add time with AtomEntry? Have looked at publish, but
never understood it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi
-~----------~----~----~----~------~----~------~--~---