Exemple #1
0
        public void DeleteAccountBan(AccountBan ban)
        {
            Contract.Requires(ban != null);

            ban.Delete();
            RemoveAccountBan(ban);
        }
Exemple #2
0
        public AccountBan CreateAccountBan(Accounts.Account acc, string notes, DateTime?expiry)
        {
            Contract.Requires(acc != null);
            Contract.Ensures(Contract.Result <AccountBan>() != null);

            var rec = new AccountBanRecord(acc.Record)
            {
                Notes  = notes,
                Expiry = expiry,
            };

            rec.Create();

            var ban = new AccountBan(rec);

            AddAccountBan(ban);
            return(ban);
        }
Exemple #3
0
        public void RemoveAccountBan(AccountBan ban)
        {
            Contract.Requires(ban != null);

            _accountBans.Remove(ban);
        }
Exemple #4
0
        public void AddAccountBan(AccountBan ban)
        {
            Contract.Requires(ban != null);

            _accountBans.Add(ban);
        }