public CalendarSecondaryNavigation(OwaContext owaContext, StoreObjectId selectedFolderId, ExDateTime?day, CalendarFolderList calendarFolderList) : base(owaContext, selectedFolderId) { HttpRequest request = owaContext.HttpContext.Request; UserContext userContext = owaContext.UserContext; if (selectedFolderId == null) { this.selectedFolderId = (RequestParser.GetFolderIdFromQueryString(request, false) ?? userContext.CalendarFolderId); } if (day != null) { this.day = day.Value; } else { CalendarModuleViewState calendarModuleViewState = userContext.LastClientViewState as CalendarModuleViewState; if (calendarModuleViewState != null && selectedFolderId.Equals(calendarModuleViewState.FolderId)) { this.day = calendarModuleViewState.DateTime; } else { this.day = DateTimeUtilities.GetLocalTime().Date; } } this.calendarFolderList = calendarFolderList; }
// Token: 0x06000300 RID: 768 RVA: 0x0001AF0C File Offset: 0x0001910C public PreFormActionResponse Execute(OwaContext owaContext, out ApplicationElement applicationElement, out string type, out string state, out string action) { if (owaContext == null) { throw new ArgumentNullException("OwaContext"); } applicationElement = ApplicationElement.NotSet; type = null; state = null; action = null; HttpRequest request = owaContext.HttpContext.Request; UserContext userContext = owaContext.UserContext; if (!Utilities.IsPostRequest(request)) { return(userContext.LastClientViewState.ToPreFormActionResponse()); } string type2 = owaContext.FormsRegistryContext.Type; NavigationModule navigationModuleFromStoreType = MoveItemHelper.GetNavigationModuleFromStoreType(type2); ApplicationElement applicationElementFromStoreType = MoveItemHelper.GetApplicationElementFromStoreType(type2); if ((navigationModuleFromStoreType == NavigationModule.Calendar && !userContext.IsFeatureEnabled(Feature.Calendar)) || (navigationModuleFromStoreType == NavigationModule.Contacts && !userContext.IsFeatureEnabled(Feature.Contacts))) { throw new OwaSegmentationException("The " + type + " feature is disabled"); } StoreObjectId[] storeObjectIdsFromForm = RequestParser.GetStoreObjectIdsFromForm(request, true); StoreObjectId folderIdFromQueryString = RequestParser.GetFolderIdFromQueryString(request, true); StoreObjectId targetFolderIdFromQueryString = RequestParser.GetTargetFolderIdFromQueryString(request, true); string formParameter = Utilities.GetFormParameter(request, "hidt"); string[] array = formParameter.Split(new char[] { ',' }); if (array.Length != storeObjectIdsFromForm.Length) { throw new OwaInvalidRequestException("The counts of the items and their types are not identical."); } ItemOperations.Result result = null; if (navigationModuleFromStoreType == NavigationModule.Mail && applicationElementFromStoreType == ApplicationElement.Item) { result = ItemOperations.GetNextViewItem(userContext, ItemOperations.Action.Delete, storeObjectIdsFromForm[0], folderIdFromQueryString); } if (!MoveItemPreFormAction.DoMove(targetFolderIdFromQueryString, storeObjectIdsFromForm, array, owaContext)) { PreFormActionResponse preFormActionResponse = new PreFormActionResponse(); preFormActionResponse.ApplicationElement = ApplicationElement.Dialog; preFormActionResponse.Type = owaContext.FormsRegistryContext.Type; preFormActionResponse.Action = owaContext.FormsRegistryContext.Action; preFormActionResponse.AddParameter("fid", folderIdFromQueryString.ToBase64String()); return(preFormActionResponse); } if (result != null) { owaContext[OwaContextProperty.InfobarMessage] = null; } userContext.ForceNewSearch = true; return(ItemOperations.GetPreFormActionResponse(userContext, result)); }
// Token: 0x060001E9 RID: 489 RVA: 0x000128F8 File Offset: 0x00010AF8 public PreFormActionResponse Execute(OwaContext owaContext, out ApplicationElement applicationElement, out string type, out string state, out string action) { if (owaContext == null) { throw new ArgumentNullException("owaContext"); } applicationElement = ApplicationElement.NotSet; type = string.Empty; action = string.Empty; state = string.Empty; this.userContext = owaContext.UserContext; this.httpRequest = owaContext.HttpContext.Request; if (!Utilities.IsPostRequest(this.httpRequest)) { return(this.userContext.LastClientViewState.ToPreFormActionResponse()); } this.folderManagementHelper = new FolderManagementHelper(owaContext); this.module = RequestParser.GetNavigationModuleFromQueryString(this.httpRequest, NavigationModule.Mail, true); if ((this.module == NavigationModule.Calendar && !this.userContext.IsFeatureEnabled(Feature.Calendar)) || (this.module == NavigationModule.Contacts && !this.userContext.IsFeatureEnabled(Feature.Contacts))) { throw new OwaSegmentationException("The " + this.module.ToString() + " feature is disabled"); } this.folderId = RequestParser.GetFolderIdFromQueryString(this.httpRequest, true); string action2; if ((action2 = owaContext.FormsRegistryContext.Action) != null) { PreFormActionResponse preFormActionResponse; if (!(action2 == "Create")) { if (!(action2 == "Rename")) { if (!(action2 == "Move")) { if (!(action2 == "Delete")) { goto IL_152; } preFormActionResponse = this.ExecuteDeleteAction(); } else { preFormActionResponse = this.ExecuteMoveAction(); } } else { preFormActionResponse = this.ExecuteRenameAction(); } } else { preFormActionResponse = this.ExecuteCreateAction(); } if (owaContext[OwaContextProperty.InfobarMessage] != null) { ((InfobarMessage)owaContext[OwaContextProperty.InfobarMessage]).IsActionResult = true; } preFormActionResponse.ApplicationElement = ApplicationElement.Dialog; preFormActionResponse.Type = "FolderManagement"; PreFormActionResponse preFormActionResponse2 = preFormActionResponse; string name = "m"; int num = (int)this.module; preFormActionResponse2.AddParameter(name, num.ToString()); preFormActionResponse.AddParameter("fid", this.folderId.ToBase64String()); return(preFormActionResponse); } IL_152: throw new OwaInvalidRequestException("Invalid action for folder management preformaction"); }