Exemple #1
0
        private void UpdateSourceTable()
        {
            var requests = _programInterface.RequestRepository.FindAll();

            var sourceAmount = _programInterface.SourceAmount;

            SourceTable.Clear();

            for (int i = 0; i < sourceAmount; i++)
            {
                var n = requests.Where(k => k.SourceId.Equals(i)).ToArray().Length;
                var rejectedAmount = requests.Where(k => k.SourceId.Equals(i)).Count(k => k is RejectedRequest);

                SourceTable.Add(new SourceTableView()
                {
                    SourceId = i, GeneratedAmount = n, RejectedAmount = rejectedAmount
                });
            }
        }