protected virtual async void OnQuickLinkMenu(QuickLinkCommandParameter parameter)
        {
            if (!ConnectionManager.Instance.AllowRequest())
            {
                return;
            }
            if (!OnCanQuickLinkMenu(parameter))
            {
                return;
            }

            try
            {
                WaitStart();

                using (var objectManager = IoC.Instance.Resolve <ISysObjectManager>())
                {
                    var    entitytype       = objectManager.GetTypeByName(parameter.EntityName);
                    string filterExpression = null;
                    switch (parameter.Action)
                    {
                    case "HISTORY":
                        var ovm = IoC.Instance.Resolve(typeof(HistoryListViewModelBase <>).MakeGenericType(entitytype));
                        var lvm = ovm as IListViewModel;
                        if (lvm != null)
                        {
                            if (!string.IsNullOrEmpty(parameter.Filter))
                            {
                                filterExpression = GetFilterQuickLink(parameter.Filter);
                            }
                            await ShowQuickLink(lvm, filterExpression);
                        }
                        break;

                    case "ARCHIVE":
                        throw new DeveloperException("No method - ViewArchive");

                    default:
                        var        command = parameter.EntityName + ModuleBase.ViewServiceRegisterSuffixTreeShow;
                        IViewModel vm;
                        var        viewservice = GetViewService();
                        if (!viewservice.TryResolveViewModel(command, out vm))
                        {
                            command = parameter.EntityName + ModuleBase.ViewServiceRegisterSuffixListShow;
                            viewservice.TryResolveViewModel(command, out vm);
                        }

                        if (vm == null)
                        {
                            throw new DeveloperException(DeveloperExceptionResources.CantCreateViewmodelForCommand, command);
                        }

                        if (parameter.Action == "WORK")
                        {
                            if (!string.IsNullOrEmpty(parameter.Filter))
                            {
                                filterExpression = GetFilterQuickLink(parameter.Filter);
                            }
                        }
                        await ShowQuickLink(vm, filterExpression);

                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                if (!ExceptionHandler(ex, StringResources.Error))
                {
                    throw;
                }
            }
            finally
            {
                WaitStop();
            }
        }
 private bool OnCanQuickLinkMenu(QuickLinkCommandParameter parameter)
 {
     return(HasSelectedItems() && !IsInFiltering &&
            parameter != null && !string.IsNullOrEmpty(parameter.EntityName));
 }