protected override void InitializeModel() { base.InitializeModel(); if (_accountAuthorizationRequestManagerService == null) { throw new ArgumentNullException("_accountAuthorizationRequestManagerService"); } if (_flowService == null) { throw new ArgumentNullException("_flowService"); } _modelState = new PageModelState(); IList <DataFlow> flows = _flowService.GetProtectedFlows(VisitHelper.GetVisit(), false); _modelState.Flows = new SortedList <string, DataFlow>(); if (!CollectionUtils.IsNullOrEmpty(flows)) { foreach (DataFlow flow in flows) { _modelState.Flows.Add(flow.FlowName.ToUpper(), flow); } } LoadRequests(); }
protected override void InitializeModel() { base.InitializeModel(); if (_accountService == null) { throw new ArgumentNullException("_accountService"); } if (_policyService == null) { throw new ArgumentNullException("_policyService"); } if (_flowService == null) { throw new ArgumentNullException("_flowService"); } if (_centralProcessor == null) { throw new ArgumentNullException("_centralProcessor"); } _modelState = new PageModelState(); _modelState.NaasUserList = _policyService.GetCachedNaasUsernameList(true, VisitHelper.GetVisit()); _isAddUsers = true; AssignEditUserAccount(false); if (_editUserAccount != null) { bool userExistsInNAAS = _accountService.UserExistsInNAAS(_editUserAccount.NaasAccount, VisitHelper.GetVisit(), out _userAffiliate, out _canDeleteUser, out _canRemoveUser); _canResetPassword = _canDeleteUser; if (userExistsInNAAS) { _isAddUsers = false; } } }
protected override void InitializeModel() { base.InitializeModel(); if (DataItemService == null) { throw new ArgumentNullException("DataItemService"); } if (UserSettingsManager == null) { throw new ArgumentNullException("Missing UserSettingsManager"); } _modelState = new PageModelState(); IList <ScheduledItem> scheduledItems = DataItemService.GetSchedules(VisitHelper.GetVisit()); if (!CollectionUtils.IsNullOrEmpty(scheduledItems)) { IDictionary <string, string> flows = DataItemService.GetExchangeList(VisitHelper.GetVisit(), false); _modelState.FlowToScheduledItems = new Dictionary <string, Dictionary <string, ScheduledItem> >(); _modelState.Flows = new Dictionary <string, string>(); _modelState.ScheduledItems = new Dictionary <string, ScheduledItem>(); foreach (ScheduledItem scheduledItem in scheduledItems) { Dictionary <string, ScheduledItem> scheduledItemList; if (!_modelState.FlowToScheduledItems.TryGetValue(scheduledItem.FlowId, out scheduledItemList)) { scheduledItemList = new Dictionary <string, ScheduledItem>(); _modelState.FlowToScheduledItems.Add(scheduledItem.FlowId, scheduledItemList); } scheduledItemList.Add(scheduledItem.Id, scheduledItem); _modelState.ScheduledItems.Add(scheduledItem.Id, scheduledItem); if (!_modelState.Flows.ContainsKey(scheduledItem.FlowId)) { string flowName = flows[scheduledItem.FlowId]; _modelState.Flows.Add(scheduledItem.FlowId, flowName); } } } }
protected override void LoadModel(object savedModel) { _modelState = (PageModelState)savedModel; }