protected override void OnLoad(EventArgs e) { base.FilteredView = false; base.OnLoad(e); EditCalendarItemHelper.ClearUserContextData(base.UserContext); this.CreateExpiringPasswordNotification(); this.CreateOutOfOfficeNotification(); int num = RequestParser.TryGetIntValueFromQueryString(base.Request, "slUsng", -1); if (num >= 0 && num <= 2) { this.selectedUsing = (SecondaryNavigationArea)num; } if (base.UserContext.IsWebPartRequest) { base.UserContext.LastClientViewState = new WebPartModuleViewState(base.FolderId, base.Folder.ClassName, base.PageNumber, NavigationModule.Mail, base.SortOrder, base.SortedColumn); return; } if (base.FilteredView) { base.UserContext.LastClientViewState = new MessageModuleSearchViewState(base.UserContext.LastClientViewState, base.FolderId, base.OwaContext.FormsRegistryContext.Type, this.selectedUsing, base.PageNumber, base.SearchString, base.SearchScope); return; } base.UserContext.LastClientViewState = new MessageModuleViewState(base.FolderId, base.OwaContext.FormsRegistryContext.Type, this.selectedUsing, base.PageNumber); }
public static void SetCalendarItemFromQueryParams(CalendarItemBase calendarItemBase, HttpRequest request, UserContext userContext) { bool isMeeting = Utilities.GetQueryStringParameter(request, "mr", false) != null; ExDateTime exDateTime = ExDateTime.MinValue; ExDateTime endTime = ExDateTime.MinValue; ExDateTime localTime = DateTimeUtilities.GetLocalTime(); int num = RequestParser.TryGetIntValueFromQueryString(request, "yr", -1); int num2 = RequestParser.TryGetIntValueFromQueryString(request, "mn", -1); int num3 = RequestParser.TryGetIntValueFromQueryString(request, "dy", -1); if (num != -1 && num2 != -1 && num3 != -1) { exDateTime = new ExDateTime(userContext.TimeZone, num, num2, num3, localTime.Hour, localTime.Minute, 0); } if (exDateTime == ExDateTime.MinValue) { exDateTime = new ExDateTime(userContext.TimeZone, localTime.Year, localTime.Month, localTime.Day, localTime.Hour, localTime.Minute, 0); } if (exDateTime.Minute != 0 && exDateTime.Minute != 30) { exDateTime = exDateTime.AddMinutes((double)(30 - exDateTime.Minute % 30)); } endTime = exDateTime.AddMinutes(60.0); calendarItemBase.StartTime = exDateTime; calendarItemBase.EndTime = endTime; calendarItemBase.IsMeeting = isMeeting; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.targetFolderId = RequestParser.GetTargetFolderIdFromQueryString(base.Request, false); this.selectedFolderId = RequestParser.GetFolderIdFromQueryString(base.Request, false); this.FetchModule(); this.FetchSelectedItems(); this.InitializeFolderList(); this.folderDropDown = new FolderDropdown(base.UserContext); }
// Token: 0x06000539 RID: 1337 RVA: 0x00029C08 File Offset: 0x00027E08 protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.folderDropdown = new FolderDropdown(base.UserContext); this.selectedFolderId = RequestParser.GetFolderIdFromQueryString(base.Request, false); if (this.selectedFolderId == null) { ModuleViewState moduleViewState = base.UserContext.LastClientViewState as ModuleViewState; if (moduleViewState != null) { this.selectedFolderId = moduleViewState.FolderId; } } if (this.selectedFolderId == null) { switch (this.module) { case NavigationModule.Mail: this.selectedFolderId = base.UserContext.InboxFolderId; break; case NavigationModule.Calendar: this.selectedFolderId = base.UserContext.CalendarFolderId; break; case NavigationModule.Contacts: this.selectedFolderId = base.UserContext.ContactsFolderId; break; } } this.module = RequestParser.GetNavigationModuleFromQueryString(base.Request, NavigationModule.Mail, true); if ((this.module == NavigationModule.Calendar && !base.UserContext.IsFeatureEnabled(Feature.Calendar)) || (this.module == NavigationModule.Contacts && !base.UserContext.IsFeatureEnabled(Feature.Contacts))) { throw new OwaSegmentationException("The " + this.module.ToString() + " feature is disabled"); } this.InitializeFolderList(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); string queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "ctx"); int num; if (!int.TryParse(queryStringParameter, out num)) { throw new OwaInvalidRequestException("Context parameter is having invalid format"); } if (num < 0 || num > 4) { throw new OwaInvalidRequestException("Invalid context value in the querystring parameter"); } this.viewMode = (AddressBook.Mode)num; if (this.viewMode == AddressBook.Mode.None) { this.viewMode = AddressBook.Mode.Lookup; } if (base.IsPostFromMyself()) { this.action = Utilities.GetFormParameter(base.Request, "hidcmdpst", false); this.searchString = Utilities.GetFormParameter(base.Request, "hidss", false); this.pageNumber = RequestParser.TryGetIntValueFromForm(base.Request, "hidpg", 1); this.sortColumn = (ColumnId)RequestParser.TryGetIntValueFromForm(base.Request, "hidcid", 11); this.sortOrder = (SortOrder)RequestParser.TryGetIntValueFromForm(base.Request, "hidso", 1); this.addressBookToSearch = Utilities.GetFormParameter(base.Request, "hidAB", false); if (string.IsNullOrEmpty(this.addressBookToSearch)) { throw new OwaInvalidRequestException("addressbookGuid can't be null"); } this.recipientWell = (RecipientItemType)RequestParser.TryGetIntValueFromForm(base.Request, "hidrw", 1); } else { this.searchString = Utilities.GetQueryStringParameter(base.Request, "sch", false); if (!string.IsNullOrEmpty(this.searchString)) { Utilities.VerifySearchCanaryInGetRequest(base.Request); } this.pageNumber = RequestParser.TryGetIntValueFromQueryString(base.Request, "pg", 1); this.sortColumn = (ColumnId)RequestParser.TryGetIntValueFromQueryString(base.Request, "cid", 11); this.sortOrder = (SortOrder)RequestParser.TryGetIntValueFromQueryString(base.Request, "so", 1); this.addressBookToSearch = Utilities.GetQueryStringParameter(base.Request, "ab", false); this.recipientWell = (RecipientItemType)RequestParser.TryGetIntValueFromQueryString(base.Request, "rw", 1); } this.GetSearchLocation(); if (AddressBook.IsEditingMode(this.viewMode)) { if (!base.IsPostFromMyself()) { bool required = this.viewMode != AddressBook.Mode.EditCalendar; StoreObjectId itemId = QueryStringUtilities.CreateItemStoreObjectId(base.UserContext.MailboxSession, base.Request, required); base.Item = AddressBookHelper.GetItem(base.UserContext, this.viewMode, itemId, null); } else { StoreObjectId itemId2 = null; string formParameter = Utilities.GetFormParameter(base.Request, "hidid", true); if (!string.IsNullOrEmpty(formParameter)) { itemId2 = Utilities.CreateStoreObjectId(base.UserContext.MailboxSession, formParameter); } string formParameter2 = Utilities.GetFormParameter(base.Request, "hidchk", true); base.Item = AddressBookHelper.GetItem(base.UserContext, this.viewMode, itemId2, formParameter2); string a; if ((a = this.action) != null) { if (!(a == "addrcp")) { if (a == "rmrcp") { int intValueFromForm = RequestParser.GetIntValueFromForm(base.Request, "hidri"); if (this.viewMode == AddressBook.Mode.EditMessage || this.viewMode == AddressBook.Mode.EditMeetingResponse) { if (intValueFromForm >= 0 && intValueFromForm < this.Message.Recipients.Count) { this.Message.Recipients.RemoveAt(intValueFromForm); AddressBookHelper.SaveItem(base.Item); } } else if (this.viewMode == AddressBook.Mode.EditCalendar) { CalendarUtilities.RemoveAttendeeAt(this.CalendarItemBase, intValueFromForm); EditCalendarItemHelper.CreateUserContextData(base.UserContext, this.CalendarItemBase); } } } else { int num2 = RequestParser.TryGetIntValueFromQueryString(base.Request, "rt", 1); if (num2 == 1) { this.type = RecipientItemType.To; } else if (num2 == 2) { this.type = RecipientItemType.Cc; } else if (num2 == 3) { this.type = RecipientItemType.Bcc; } string text = base.Request.Form["chkRcpt"]; if (!string.IsNullOrEmpty(text)) { this.ids = text.Split(new char[] { ',' }); if (this.searchLocation == AddressBook.SearchLocation.AddressBook) { AddressBookHelper.AddRecipientsToDraft(this.ids, base.Item, this.type, base.UserContext); } else { AddressBookHelper.AddContactsToDraft(base.Item, this.type, base.UserContext, this.ids); } } } } } } if (!string.IsNullOrEmpty(this.searchString)) { this.searchString = this.searchString.Trim(); if (this.searchString.Length > Globals.MaxSearchStringLength) { throw new OwaInvalidRequestException("Search string length is more than 256 characters"); } } if (this.pageNumber == 0) { this.pageNumber = 1; } this.firstItemOnPage = (this.pageNumber - 1) * base.UserContext.UserOptions.BasicViewRowCount + 1; this.lastItemOnPage = this.firstItemOnPage + base.UserContext.UserOptions.BasicViewRowCount - 1; this.CreateListView(); if (AddressBook.IsEditingMode(this.viewMode) || !string.IsNullOrEmpty(this.searchString)) { base.UserContext.LastClientViewState = new AddressBookSearchViewState(base.UserContext.LastClientViewState, this.viewMode, this.addressBookToSearch, this.searchString, this.pageNumber, (base.Item == null || base.Item.Id == null) ? null : base.Item.Id.ObjectId, (base.Item == null || base.Item.Id == null) ? null : base.Item.Id.ChangeKeyAsBase64String(), this.recipientWell, this.sortColumn, this.sortOrder); return; } base.UserContext.LastClientViewState = new AddressBookViewState(base.UserContext.LastClientViewState, this.viewMode, this.pageNumber, (base.Item == null || base.Item.Id == null) ? null : base.Item.Id.ObjectId, (base.Item == null || base.Item.Id == null) ? null : base.Item.Id.ChangeKeyAsBase64String(), this.recipientWell, this.sortColumn, this.sortOrder); }
// Token: 0x060006CC RID: 1740 RVA: 0x000352FF File Offset: 0x000334FF public static StoreObjectId GetTargetFolderIdFromQueryString(HttpRequest request, bool required) { return(RequestParser.GetStoreObjectId(request, "tfId", required, ParameterIn.Form)); }
// Token: 0x060006CA RID: 1738 RVA: 0x000352E0 File Offset: 0x000334E0 public static NavigationModule GetNavigationModuleFromQueryString(HttpRequest request, NavigationModule defaultModule, bool required) { return((NavigationModule)RequestParser.GetIntValueFromRequest(request, "m", ParameterIn.QueryString, required, (int)defaultModule)); }
// Token: 0x060006C8 RID: 1736 RVA: 0x00035257 File Offset: 0x00033457 public static int TryGetIntValueFromForm(HttpRequest request, string parameterName, int defaultValue) { return(RequestParser.GetIntValueFromRequest(request, parameterName, ParameterIn.Form, false, defaultValue)); }
// Token: 0x060006C7 RID: 1735 RVA: 0x0003524B File Offset: 0x0003344B public static int GetIntValueFromForm(HttpRequest request, string parameterName) { return(RequestParser.GetIntValueFromRequest(request, parameterName, ParameterIn.Form, true, 0)); }
// Token: 0x060006CE RID: 1742 RVA: 0x0003534B File Offset: 0x0003354B public static StoreObjectId[] GetStoreObjectIdsFromForm(HttpRequest request, bool required) { return(RequestParser.GetStoreObjectIdsFromForm(request, "hidid", required)); }