protected void ButtonDelete_Click(object sender, EventArgs e)
 {
     if (_authority.HasPermission(Permission.CanEditMailDB, Organization.PPSEid, -1, Authorization.Flag.AnyGeographyExactOrganization))
     {
         MailServerDatabase.DeleteAccount(account);
         PWLog.Write(_currentUser, PWLogItem.MailAccount, 0, PWLogAction.MailAccountChanged, "Deleted account", "Manually changed in PW", account, "", "");
         ScriptManager.RegisterStartupScript(this, this.GetType(), "saved", "CloseAndRebind();", true);
     }
 }
예제 #2
0
    protected void ButtonDeleteMail_Click(object sender, EventArgs e)
    {
        Person    _currentUser = Person.FromIdentity(Convert.ToInt32(HttpContext.Current.User.Identity.Name));
        Authority _authority   = _currentUser.GetAuthority();

        if (_authority.HasPermission(Permission.CanEditMailDB, Organization.PPSEid, -1, Authorization.Flag.AnyGeographyExactOrganization))
        {
            MailServerDatabase.DeleteAccount(TextPartyEmail.Text);
            PWLog.Write(_currentUser, PWLogItem.MailAccount, 0, PWLogAction.MailAccountChanged, "Deleted account", "Manually changed in PW", TextPartyEmail.Text, "", "");
            TextPartyEmail.Text = "";
        }
    }