예제 #1
0
        public AuditViewModel(IAuditRepository repo, IUserNotify notify)
        {
            this.repo = repo;
            this.notify = notify;

            try
            {
                UsersList = repo.AuditLogRepo.GetAllUsers();
                searchCommand = ViewModelSource.Create(() => new AuditSearchCommand(this, repo.AuditLogRepo, notify));
            }
            catch(RepositoryException ex)
            {
                log.Warn("AuditViewModel " + ex.ToString());
                notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
            Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
            }

        }
예제 #2
0
 public AuditViewModel(IAuditLogRepository repo)
 {
     this.repo     = repo;
     UsersList     = repo.GetAllUsers();
     searchCommand = ViewModelSource.Create(() => new AuditSearchCommand(this, repo));
 }