protected void bntAddTag_Click(object sender, EventArgs e)
        {
            int addTagId;

            if (!int.TryParse(ddTags.SelectedValue, out addTagId))
            {
                return;
            }

            Providers.HostedSolution.ExchangeRetentionPolicyTag tag = ES.Services.ExchangeServer.GetExchangeRetentionPolicyTag(PanelRequest.ItemID, addTagId);
            if (tag == null)
            {
                return;
            }

            List <ExchangeMailboxPlanRetentionPolicyTag> res = ViewState["Tags"] as List <ExchangeMailboxPlanRetentionPolicyTag>;

            if (res == null)
            {
                res = new List <ExchangeMailboxPlanRetentionPolicyTag>();
            }

            ExchangeMailboxPlanRetentionPolicyTag add = new ExchangeMailboxPlanRetentionPolicyTag();

            add.MailboxPlanId = PanelRequest.GetInt("MailboxPlanId");
            add.TagID         = tag.TagID;
            add.TagName       = tag.TagName;

            res.Add(add);

            ViewState["Tags"] = res;

            gvPolicy.DataSource = res;
            gvPolicy.DataBind();

            UpdateTags();
        }
Esempio n. 2
0
 public IntResult AddExchangeMailboxPlanRetentionPolicyTag(int itemId, ExchangeMailboxPlanRetentionPolicyTag planTag)
 {
     return(ExchangeServerController.AddExchangeMailboxPlanRetentionPolicyTag(itemId, planTag));
 }