protected void RenderCalendarProperties(CalendarViewBase view) { CalendarAdapterBase calendarAdapter = view.CalendarAdapter; this.RenderValue(this.Output, "sFId", calendarAdapter.IdentityString); this.RenderValue(this.Output, "fHRtL", calendarAdapter.UserCanReadItem); this.RenderValue(this.Output, "Title", SanitizedHtmlString.GetSanitizedStringWithoutEncoding(calendarAdapter.CalendarTitle)); this.RenderValue(this.Output, "sDD", view.FolderDateDescription); this.RenderValue(this.Output, "fCC", calendarAdapter.DataSource.UserCanCreateItem); CalendarAdapter calendarAdapter2 = calendarAdapter as CalendarAdapter; this.RenderValue(this.Output, "iSharedType", (int)calendarAdapter.DataSource.SharedType); if (calendarAdapter2 != null) { if (calendarAdapter2.PromotedFolderId != null) { this.RenderValue(this.Output, "sPromotedFolderId", calendarAdapter2.PromotedFolderId.ToBase64String()); } this.RenderValue(this.Output, "sLegacyDN", calendarAdapter2.LegacyDN); if (calendarAdapter2.DataSource.SharedType == SharedType.InternalFreeBusy) { this.RenderValue(this.Output, "sCalendarOwnerDisplayName", calendarAdapter2.CalendarOwnerDisplayName); } this.RenderValue(this.Output, "iOlderExchangeCalendarType", (int)calendarAdapter2.OlderExchangeSharedCalendarType); this.RenderColor(calendarAdapter2); this.RenderValue(this.Output, "fPublishedOut", calendarAdapter2.IsPublishedOut); if (calendarAdapter2.IsExternalSharedInFolder) { if (calendarAdapter2.LastAttemptTime != ExDateTime.MinValue) { this.RenderValue(this.Output, "dtSyncTime", calendarAdapter2.LastAttemptTime.ToString("g", this.SessionContext.UserCulture)); } if (calendarAdapter2.LastSuccessSyncTime != ExDateTime.MinValue) { this.RenderValue(this.Output, "dtSuccessSyncTime", calendarAdapter2.LastSuccessSyncTime.ToString("g", this.SessionContext.UserCulture)); } } this.RenderValue(this.Output, "fArchive", calendarAdapter2.IsInArchiveMailbox); if (calendarAdapter2.DataSource.SharedType == SharedType.WebCalendar) { this.RenderValue(this.Output, "sWebCalUrl", calendarAdapter2.WebCalendarUrl); return; } } else if (calendarAdapter is PublishedCalendarAdapter) { PublishedCalendarAdapter publishedCalendarAdapter = (PublishedCalendarAdapter)calendarAdapter; this.RenderValue(this.Output, "sPublishRange", SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(-1428371010), new object[] { publishedCalendarAdapter.PublishedFromDateTime.ToShortDateString(), publishedCalendarAdapter.PublishedToDateTime.ToShortDateString() })); } }
public void GetEventListForPublishedCalendar() { ExDateTime[] days = (ExDateTime[])base.GetParameter("days"); CalendarViewType viewType = (CalendarViewType)base.GetParameter("vt"); int startHour = (int)base.GetParameter("SH"); int endHour = (int)base.GetParameter("EH"); AnonymousSessionContext anonymousSessionContext = base.SessionContext as AnonymousSessionContext; if (anonymousSessionContext == null) { throw new OwaInvalidRequestException("This request can only be sent to Calendar VDir"); } using (PublishedCalendarAdapter publishedCalendarAdapter = new PublishedCalendarAdapter(anonymousSessionContext)) { publishedCalendarAdapter.LoadData(CalendarUtilities.QueryProperties, days, startHour, endHour, viewType); if (!publishedCalendarAdapter.UserCanReadItem) { throw new OwaInvalidRequestException("no read access to the calendar"); } PrintEventList printEventList = new PrintEventList(base.SessionContext, publishedCalendarAdapter, viewType, false); printEventList.RenderView(this.SanitizingWriter); } }
protected void RenderView() { base.SanitizingResponse.Write("<div id=divLVHide></div>"); base.SanitizingResponse.Write("<div id=\"divCalendarView\">"); new Infobar().Render(base.SanitizingResponse); base.SanitizingResponse.Write("<div id=\"divCalendarToolbar\">"); this.RenderToolbar(); base.SanitizingResponse.Write("</div>"); using (CalendarAdapterBase calendarAdapterBase = new PublishedCalendarAdapter((AnonymousSessionContext)base.SessionContext)) { DailyView dailyView = new DailyView(base.SessionContext, calendarAdapterBase); dailyView.RenderHeadersAndEventArea(base.SanitizingResponse, false); base.SanitizingResponse.Write("<div id=\"divDV\" style=\"display:none;\">"); base.SanitizingResponse.Write("<div id=\"divTS\">"); dailyView.RenderTimeStrip(base.SanitizingResponse); base.SanitizingResponse.Write("</div>"); dailyView.RenderSchedulingArea(base.SanitizingResponse); base.SanitizingResponse.Write("</div>"); this.monthlyView.RenderView(base.SanitizingResponse, true); base.SanitizingResponse.Write("</div>"); base.SanitizingResponse.Write("<div id=\"divSubjectFH\" class=\"visSbj\">MM</div>"); base.SanitizingResponse.Write("<div id=\"divLocationFH\" class=\"visLn\">MM</div>"); } }
public void GetPublishedViewPayload() { ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "CalendarViewEventHandler.GetPublishedViewPayload"); AnonymousSessionContext anonymousSessionContext = base.SessionContext as AnonymousSessionContext; if (anonymousSessionContext == null) { throw new OwaInvalidRequestException("This request can only be sent to Calendar VDir"); } CalendarViewType calendarViewType = (CalendarViewType)base.GetParameter("vt"); ExDateTime[] array = (ExDateTime[])base.GetParameter("days"); if (array == null) { array = new ExDateTime[] { DateTimeUtilities.GetLocalTime().Date }; } int num = 0; if (base.IsParameterSet("dir")) { num = (int)base.GetParameter("dir"); } if (num != 0) { CalendarViewEventHandler.MoveDates(array, calendarViewType, num); } this.ValidateDays(array, calendarViewType, num); ExTimeZone exTimeZone = null; if (base.IsParameterSet("tz")) { string text = (string)base.GetParameter("tz"); if (ExTimeZoneEnumerator.Instance.TryGetTimeZoneByName(text, out exTimeZone)) { anonymousSessionContext.TimeZone = exTimeZone; this.HttpContext.Response.Cookies["timezone"].Value = text; this.HttpContext.Response.Cookies["timezone"].Expires = (DateTime)ExDateTime.Now.AddYears(1); } } using (PublishedCalendarAdapter publishedCalendarAdapter = new PublishedCalendarAdapter(anonymousSessionContext)) { publishedCalendarAdapter.LoadData(CalendarUtilities.QueryProperties, array, calendarViewType, exTimeZone); CalendarViewPayloadWriter calendarViewPayloadWriter; if (calendarViewType == CalendarViewType.Monthly) { calendarViewPayloadWriter = new MonthlyViewPayloadWriter(base.SessionContext, this.Writer, array, new CalendarAdapterBase[] { publishedCalendarAdapter }); } else { calendarViewPayloadWriter = new DailyViewPayloadWriter(base.SessionContext, this.Writer, array, new CalendarAdapterBase[] { publishedCalendarAdapter }); } base.ResponseContentType = OwaEventContentType.Javascript; calendarViewPayloadWriter.Render(0, calendarViewType, Microsoft.Exchange.Clients.Owa.Core.ReadingPanePosition.Off, Microsoft.Exchange.Clients.Owa.Core.ReadingPanePosition.Off); } if (Globals.ArePerfCountersEnabled) { OwaSingleCounters.CalendarViewsRefreshed.Increment(); } }
// Token: 0x060029FE RID: 10750 RVA: 0x000EB600 File Offset: 0x000E9800 protected override void OnLoad(EventArgs e) { string queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "vt", false); int num = 1; if (!string.IsNullOrEmpty(queryStringParameter) && (!int.TryParse(queryStringParameter, out num) || num < 1 || num >= 7)) { throw new OwaInvalidRequestException("View type error"); } this.viewType = (CalendarViewType)num; string queryStringParameter2 = Utilities.GetQueryStringParameter(base.Request, "wo", false); if (queryStringParameter2 == "1" || this.viewType == CalendarViewType.WorkWeek) { this.workingDayOnly = true; } this.days = Utilities.GetQueryStringParameterDateTimeArray(base.Request, "d", base.SessionContext.TimeZone, false, 7); if (this.days == null || this.days.Length == 0) { this.days = new ExDateTime[] { ExDateTime.Now.Date }; } string queryStringParameter3 = Utilities.GetQueryStringParameter(base.Request, "st", false); string queryStringParameter4 = Utilities.GetQueryStringParameter(base.Request, "et", false); if (!string.IsNullOrEmpty(queryStringParameter3)) { int.TryParse(queryStringParameter3, out this.startTime); } if (!string.IsNullOrEmpty(queryStringParameter4)) { int.TryParse(queryStringParameter4, out this.endTime); } if (this.startTime >= this.endTime || this.startTime < 0 || this.endTime > 24) { throw new OwaInvalidRequestException("start time and end time must be in range and start time must early than end time"); } if (this.workingDayOnly) { if (this.viewType == CalendarViewType.Weekly) { this.viewType = CalendarViewType.WorkWeek; } else if (this.viewType == CalendarViewType.WeeklyAgenda) { this.viewType = CalendarViewType.WorkWeeklyAgenda; } } if (this.viewType == CalendarViewType.Min) { string queryStringParameter5 = Utilities.GetQueryStringParameter(base.Request, "rn", false); if (queryStringParameter5 == "1") { this.renderNotes = true; } } string queryStringParameter6 = Utilities.GetQueryStringParameter(base.Request, "el", false); if (!string.IsNullOrEmpty(queryStringParameter6) && queryStringParameter6 == "1") { this.printEventList = true; } string queryStringParameter7 = Utilities.GetQueryStringParameter(base.Request, "id", false); if (base.SessionContext is AnonymousSessionContext) { PublishedCalendarAdapter publishedCalendarAdapter = new PublishedCalendarAdapter((AnonymousSessionContext)base.SessionContext); publishedCalendarAdapter.LoadData(CalendarUtilities.QueryProperties, this.days, this.startTime, this.endTime, this.viewType); this.calendarAdapter = publishedCalendarAdapter; } else { OwaStoreObjectId owaStoreObjectId; if (queryStringParameter7 != null) { owaStoreObjectId = OwaStoreObjectId.CreateFromString(queryStringParameter7); } else { ExTraceGlobals.CalendarTracer.TraceDebug(0L, "folder Id is null, using default folder"); owaStoreObjectId = base.UserContext.CalendarFolderOwaId; } if (owaStoreObjectId == null) { throw new OwaInvalidRequestException("Invalid folder id"); } CalendarAdapter calendarAdapter = new CalendarAdapter(base.UserContext, owaStoreObjectId); calendarAdapter.LoadData(this.printEventList ? CalendarUtilities.PrintQueryProperties : CalendarUtilities.QueryProperties, this.days, false, this.startTime, this.endTime, ref this.viewType, out this.viewWidth, out this.readingPanePosition); this.calendarAdapter = calendarAdapter; } if (!this.calendarAdapter.UserCanReadItem) { return; } base.OnLoad(e); }