Example #1
0
        public void RefreshData()
        {
            AuthorityService service = new AuthorityService();

            entities = new ObservableCollection <AuthorityEntity>(service.GetAllAuthorities());
            this.lvAuthorities.ItemsSource = entities;
        }
Example #2
0
        private bool CheckDoppione()
        {
            string authorityName = (this.DataContext as AuthorityEntity).AuthorityName.ToLower();


            AuthorityService       service  = new AuthorityService();
            List <AuthorityEntity> entities = service.GetAllAuthorities();

            if (entities.Any(x => x.AuthorityName.ToLower().Equals(authorityName)))
            {
                return(true);
            }

            return(false);
        }