protected void Page_Load(object sender, EventArgs e) { string keyStr = Request.QueryString["key"]; bool asHost = Request.QueryString["ashost"] != null; int key; if (keyStr != null && int.TryParse(keyStr, out key)) { try { string url = new WebExAdapter().GetUrlOfMeeting(asHost, key); IFrameWebex.Attributes.Add("src", url); DivError.Visible = false; DivSucess.Visible = true; } catch (WebExException err) { spanError.InnerText = err.Message; } } }
protected void Page_Init(object sender, EventArgs e) { string keyStr = Request.QueryString["key"]; int key = 0; if (string.IsNullOrWhiteSpace(keyStr) || !int.TryParse(keyStr, out key)) { DivError.Visible = true; } else { try { Meeting meet = new WebExAdapter().GetMeeting(key); txtMeetingKey.Text = meet.MeetingKey.ToString(); txtTopic.Text = meet.ConfName; txtPassword.Text = meet.Password; txtDateTime.Text = meet.StartDate.ToString(); txtDuration.Text = meet.Duration.ToString(); txtAttendees.Text = string.Join(", ", meet.Attendees); txtAgenda.Text = meet.Agenda; } catch (WebExException err) { DivError.Visible = true; spanError.InnerText = err.Message; } } }
protected void Page_Load(object sender, EventArgs e) { string keyStr = Request.QueryString["key"]; int key = 0; if (string.IsNullOrWhiteSpace(keyStr) || !int.TryParse(keyStr, out key)) { DivError.Visible = true; } else { try { Meeting meet = new WebExAdapter().GetMeeting(key); } catch (WebExException err) { DivError.Visible = true; spanError.InnerText = err.Message; } } }
protected void btnCreate_Click(object sender, EventArgs e) { Meeting meet = new Meeting(); meet.Agenda = txtAgenda.Text; meet.Attendees = txtAttendees.Text.Split(new[] { ',' }).Select(s => s.Trim()).ToList() ; meet.ConfName = txtTopic.Text; meet.Duration = int.Parse(txtDuration.Text); meet.Password = txtPassword.Text; meet.StartDate = DateTime.Parse(txtDateTime.Text); try { int meetKey = new WebExAdapter().CreateMeeting(meet); Session["create_success"] = true; Response.Redirect("Default.aspx"); } catch (WebExException wex) { DivError.Visible = true; spanError.InnerText = wex.Message; } }
protected void btnAttendee_Click(object sender, EventArgs e) { string name = null; string email = null; string meet = null; if (Request.QueryString["key"] != null) { meet = Request.QueryString["key"]; } name = txtName.Text; email = txtEmail.Text; try { bool success = new WebExAdapter().CreateAttendee(name, email,meet); // Response.Redirect("ViewMeeting.aspx?key=" + txtMeetingKey.Text); } catch(WebExException wex) { DivError.Visible = true; spanError.InnerText = wex.Message; } }
protected void Page_Load(object sender, EventArgs e) { string keyStr = Request.QueryString["key"]; int key = 0; if (string.IsNullOrWhiteSpace(keyStr) || !int.TryParse(keyStr, out key)) { DivError.Visible = true; DivInfo.Visible = false; } else { HrefUpdate.HRef = "Update.aspx?key=" + key; try { Meeting meet = new WebExAdapter().GetMeeting(key); spanMeetingName.InnerText = meet.ConfName; spanMeetingKey.InnerText = meet.MeetingKey.ToString(); spanMeetingDate.InnerText = meet.StartDate.ToString(); spanMeetingWebexID.InnerHtml = meet.HostWebExID; spanMeetingDuration.InnerText = meet.Duration.ToString() + " minutes"; spanMeetingAttendees.InnerText = string.Join(", ", meet.Attendees); hrefGuest.HRef = "RedirToMeeting.aspx?key=" + meet.MeetingKey; hrefHost.HRef = "RedirToMeeting.aspx?ashost=true&key=" + meet.MeetingKey; hrefAttendee.HRef = "CreateAttendee.aspx?key=" + meet.MeetingKey; } catch (WebExException err) { DivError.Visible = true; DivInfo.Visible = false; spanError.InnerText = err.Message; } } }