Exemple #1
0
        public async void Update()
        {
            List <DaaseVaegt> daaser = await PersistenceDaaseVaegt.GET_ALL(VaegtKontrol.ProcessOrdreNr, VaegtKontrol.KontrolNr);

            Antal = daaser.Count;


            if (Antal > 0)
            {
                double sum = 0;
                foreach (DaaseVaegt vaegt in daaser)
                {
                    sum = sum + vaegt.DasseVaegt;
                }
                Snit = sum / Antal;
            }
        }
Exemple #2
0
        public async void GetDasser()
        {
            _viewModel.IsLoading = true;
            //_viewModel.DaaseVaegts = new ObservableCollection<DaaseVaegt>();

            List <DaaseVaegt> daases = await PersistenceDaaseVaegt.GET_ALL(_viewModel.NewSelectedVaegtKontrol.VaegtKontrol.ProcessOrdreNr, _viewModel.NewSelectedVaegtKontrol.VaegtKontrol.KontrolNr);

            _viewModel.Vaegts.Clear();
            foreach (DaaseVaegt daase in daases)
            {
                //_viewModel.DaaseVaegts.Add(daase);
                _viewModel.Vaegts.Add(new Record(daase.DaaseNr, daase.DasseVaegt));
            }

            _viewModel.SelectedNr = _viewModel.Vaegts.Count + 1;
            GetEstement();
            _viewModel.IsLoading = false;
        }