Beispiel #1
0
        private ComplaintDiscussionViewModel GetDiscussionViewModel(ComplaintDiscussion complaintDiscussion)
        {
            int subdivisionId = complaintDiscussion.Subdivision.Id;

            if (viewModelsCache.ContainsKey(subdivisionId))
            {
                return(viewModelsCache[subdivisionId]);
            }
            var viewModel = new ComplaintDiscussionViewModel(complaintDiscussion, filePickerService, employeeService, CommonServices, UoW);

            viewModelsCache.Add(subdivisionId, viewModel);
            return(viewModel);
        }
Beispiel #2
0
        private ComplaintDiscussionViewModel GetDiscussionViewModel(ComplaintDiscussion complaintDiscussion)
        {
            int subdivisionId = complaintDiscussion.Subdivision.Id;

            if (viewModelsCache.ContainsKey(subdivisionId))
            {
                return(viewModelsCache[subdivisionId]);
            }

            var viewModel =
                new ComplaintDiscussionViewModel(
                    complaintDiscussion, _fileDialogService, _employeeService, CommonServices, UoW, _userRepository);

            viewModelsCache.Add(subdivisionId, viewModel);
            return(viewModel);
        }