public void OAuth3LeggedAuthenticationTest() { Tracing.TraceMsg("Entering OAuth3LeggedAuthenticationTest"); CalendarService service = new CalendarService("OAuthTestcode"); GOAuthRequestFactory requestFactory = new GOAuthRequestFactory("cl", "OAuthTestcode"); requestFactory.ConsumerKey = this.oAuthConsumerKey; requestFactory.ConsumerSecret = this.oAuthConsumerSecret; requestFactory.Token = this.oAuthToken; requestFactory.TokenSecret = this.oAuthTokenSecret; service.RequestFactory = requestFactory; CalendarEntry calendar = new CalendarEntry(); calendar.Title.Text = "Test OAuth"; Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full"); CalendarEntry createdCalendar = (CalendarEntry)service.Insert(postUri, calendar); // delete the guy again createdCalendar.Delete(); }
public void OAuth3LeggedAuthenticationTest() { Tracing.TraceMsg("Entering OAuth3LeggedAuthenticationTest"); CalendarService service = new CalendarService("OAuthTestcode"); OAuthParameters parameters = new OAuthParameters() { ConsumerKey = this.oAuthConsumerKey, ConsumerSecret = this.oAuthConsumerSecret, Token = this.oAuthToken, TokenSecret = this.oAuthTokenSecret, Scope = this.oAuthScope, SignatureMethod = this.oAuthSignatureMethod }; GOAuthRequestFactory requestFactory = new GOAuthRequestFactory("cl", "OAuthTestcode", parameters); service.RequestFactory = requestFactory; CalendarEntry calendar = new CalendarEntry(); calendar.Title.Text = "Test OAuth"; Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full"); CalendarEntry createdCalendar = (CalendarEntry)service.Insert(postUri, calendar); // delete the new entry createdCalendar.Delete(); }
protected void lbEventDeleteAll_Click(object sender, System.EventArgs e) { int EventId = int.Parse(hdnEventId.Value); CalendarEntry.Delete(EventId); BindDGEvent(); }
protected void lbDeleteEventAll_Click(object sender, System.EventArgs e) { int ProjectId = CalendarEntry.GetProject(EventId); string link; if (ProjectId > 0) { link = String.Format("../Projects/ProjectView.aspx?ProjectId={0}", ProjectId); } else { link = "../Workspace/default.aspx?Btab=Workspace"; } CalendarEntry.Delete(EventId); Response.Redirect(link, true); }