Exemplo n.º 1
0
        public void RefreshData()
        {
            LicencePlateService service = new LicencePlateService();

            licencePlates = new ObservableCollection <LicencePlateEntity>(service.GetAllLicencePlates());
            this.lvLicencePlates.ItemsSource = licencePlates;
        }
        private bool CheckDoppione()
        {
            string licencePlate = (this.DataContext as LicencePlateEntity).Targa.ToLower();


            LicencePlateService       service = new LicencePlateService();
            List <LicencePlateEntity> targhe  = service.GetAllLicencePlates();

            if (targhe.Any(x => x.Targa.ToLower().Equals(licencePlate)))
            {
                return(true);
            }

            return(false);
        }