Exemplo n.º 1
0
 /// <summary>
 /// Unigrid button clicked.
 /// </summary>
 protected void gridElem_OnAction(string actionName, object actionArgument)
 {
     if (actionName == "remove")
     {
         // User has permission modify
         if (mModifyAccountContact)
         {
             int relationId = ValidationHelper.GetInteger(actionArgument, 0);
             AccountContactInfo relation = AccountContactInfoProvider.GetAccountContactInfo(relationId);
             if (relation != null)
             {
                 // We need to invalidate the contact as we might have modified some of its relationships and data in the cache might not be valid
                 AccountContactInfoProvider.DeleteAccountContactInfo(relation);
             }
         }
         // User doesn't have sufficient permissions
         else
         {
             if (SiteID > 0)
             {
                 CMSPage.RedirectToAccessDenied(ModuleName.CONTACTMANAGEMENT, "ModifyContacts");
             }
             else
             {
                 CMSPage.RedirectToAccessDenied(ModuleName.CONTACTMANAGEMENT, "ModifyGlobalContacts");
             }
         }
     }
 }
 /// <summary>
 /// Uni-grid button clicked.
 /// </summary>
 private void gridElem_OnAction(string actionName, object actionArgument)
 {
     if (actionName == "remove")
     {
         if (modifyAccountContact)
         {
             int relationId = ValidationHelper.GetInteger(actionArgument, 0);
             AccountContactInfoProvider.DeleteAccountContactInfo(relationId);
         }
         else
         {
             CMSPage.RedirectToAccessDenied(ModuleName.CONTACTMANAGEMENT, "Modify");
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Unigrid button clicked.
 /// </summary>
 void gridElem_OnAction(string actionName, object actionArgument)
 {
     if (actionName == "remove")
     {
         if (modifyAccountContact)
         {
             int relationId = ValidationHelper.GetInteger(actionArgument, 0);
             AccountContactInfoProvider.DeleteAccountContactInfo(relationId);
         }
         else
         {
             if (this.SiteID > 0)
             {
                 CMSPage.RedirectToCMSDeskAccessDenied("CMS.ContactManagement", "ModifyAccounts");
             }
             else
             {
                 CMSPage.RedirectToCMSDeskAccessDenied("CMS.ContactManagement", "ModifyGlobalAccounts");
             }
         }
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Unigrid button clicked.
 /// </summary>
 protected void gridElem_OnAction(string actionName, object actionArgument)
 {
     if (actionName == "remove")
     {
         // User has permission modify
         if (modifyAccountContact)
         {
             int relationId = ValidationHelper.GetInteger(actionArgument, 0);
             AccountContactInfoProvider.DeleteAccountContactInfo(relationId);
         }
         // User doesn't have sufficient permissions
         else
         {
             if (this.SiteID > 0)
             {
                 CMSPage.RedirectToCMSDeskAccessDenied("CMS.ContactManagement", "ModifyContacts");
             }
             else
             {
                 CMSPage.RedirectToCMSDeskAccessDenied("CMS.ContactManagement", "ModifyGlobalContacts");
             }
         }
     }
 }