Exemplo n.º 1
0
        public void SwitchAccountEventAction(AccountEventCode accountEventCode, bool off = true)
        {
            var accountEventSettings = accountEventAction.FirstOrDefault(a => a.EventCode == accountEventCode);

            if (accountEventSettings != null)
            {
                accountEventSettings.EventAction = off ? Contract.Entity.AccountEventAction.DoNothing : Contract.Entity.AccountEventAction.DefaultAction;
            }
        }
Exemplo n.º 2
0
        public AccountEventAction GetAccountEventAction(AccountEventCode code)
        {
            var act = accountEventAction.FirstOrDefault(a => a.EventCode == code);

            if (act != null)
            {
                return(act.EventAction);
            }
            return(Contract.Entity.AccountEventAction.DefaultAction);
        }
Exemplo n.º 3
0
 public AccountEvent(string title, string body, AccountEventCode accountEventCode)
 {
     Title = title;
     Body = body;
     AccountEventCode = accountEventCode;
 }
Exemplo n.º 4
0
 public AccountEventSettings(AccountEventCode eventCode,
     AccountEventAction eventAction)
 {
     EventCode = eventCode;
     EventAction = eventAction;
 }
Exemplo n.º 5
0
 public AccountEvent(string title, string body, AccountEventCode accountEventCode)
 {
     Title            = title;
     Body             = body;
     AccountEventCode = accountEventCode;
 }
Exemplo n.º 6
0
 public void SwitchAccountEventAction(AccountEventCode accountEventCode, bool off = true)
 {
     var accountEventSettings = accountEventAction.FirstOrDefault(a => a.EventCode == accountEventCode);
     if (accountEventSettings != null)
         accountEventSettings.EventAction = off ? Contract.Entity.AccountEventAction.DoNothing : Contract.Entity.AccountEventAction.DefaultAction;
 }
Exemplo n.º 7
0
 public AccountEventAction GetAccountEventAction(AccountEventCode code)
 {
     var act = accountEventAction.FirstOrDefault(a => a.EventCode == code);
     if (act != null)
         return act.EventAction;
     return Contract.Entity.AccountEventAction.DefaultAction;
 }
 public AccountEventSettings(AccountEventCode eventCode,
                             AccountEventAction eventAction)
 {
     EventCode   = eventCode;
     EventAction = eventAction;
 }