コード例 #1
0
ファイル: AuditViewModel.cs プロジェクト: AleksMorozova/prizm
        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));
 }