Beispiel #1
0
        private void DefToolBarCommands()
        {
            if (_authContext.CheckPermission(PredefinedPermissions.CustomersAddCaseComments))
            {
                ToolBarCommmands.Add(new CommunicationItemComands()
                {
                    CommandParametr  = CommunicationItemType.PublicReply,
                    Header           = "Public reply".Localize(),
                    ToolTip          = "Add public reply".Localize(),
                    Command          = new DelegateCommand <object>(RaisePublicReplyAddInteractionRequest, (x) => _authContext.CheckPermission(PredefinedPermissions.CustomersAddCaseComments)),
                    IsActive         = true,
                    CommandGroupName = "CaseCommandGroup"
                });

                ToolBarCommmands.Add(new CommunicationItemComands()
                {
                    CommandParametr = CommunicationItemType.Note,
                    Header          = "Internal note".Localize(),
                    //Icon = "/VirtoCommerce.ManagementClient.Customers;component/Resources/images/note.png",
                    ToolTip          = "Add note".Localize(),
                    Command          = new DelegateCommand <object>(RaiseNoteAddInteractionRequest, (x) => _authContext.CheckPermission(PredefinedPermissions.CustomersAddCaseComments)),
                    CommandGroupName = "CaseCommandGroup"
                });
            }
            OnPropertyChanged("HasAnyToolBarCommands");
        }
Beispiel #2
0
 private void AddItem(object item)
 {
     if (ToolBarCommmands != null)
     {
         var activeCommand = ToolBarCommmands.SingleOrDefault(c => c.IsActive);
         if (activeCommand != null)
         {
             activeCommand.Command.Execute(NewBody);
         }
     }
 }
Beispiel #3
0
 /// <summary>
 /// Define available ToolBar operations (commands)
 /// </summary>
 private void DefToolBarCommands()
 {
     ToolBarCommmands.Add(new CommunicationItemComands()
     {
         //CommandParametr = CaseChannel.KnowledgeBaseArticle,
         Icon    = "/VirtoCommerce.ManagementClient.Customers;component/Resources/images/note.png",
         ToolTip = "Add article".Localize(),
         Header  = "ARTICLE".Localize(),
         Command = new DelegateCommand <object>(AppendNewItem)
     });
     OnPropertyChanged("HasAnyToolBarCommands");
 }
 private void DefToolBarCommands()
 {
     if (_authContext.CheckPermission(PredefinedPermissions.CustomersCreateCustomer))
     {
         ToolBarCommmands.Add(new CommunicationItemComands()
         {
             CommandParametr  = CommunicationItemType.Note,
             Header           = "Internal note".Localize(),
             ToolTip          = "Add note".Localize(),
             Command          = new DelegateCommand <object>(RaiseNoteAddInteractionRequest, (x) => _authContext.CheckPermission(PredefinedPermissions.CustomersCreateCustomer)),
             IsActive         = true,
             CommandGroupName = "ContactCommandGroup"
         });
         OnPropertyChanged("HasAnyToolBarCommands");
     }
 }