Beispiel #1
0
        private FactViewModel GetDeath(Individual ind)
        {
            FactViewModel fact  = null;
            var           death = (from Fact e in ind.Facts
                                   where e.FactType == FactType.Death
                                   select e).FirstOrDefault();

            if (death == null)
            {
                var burial = (from Fact e in ind.Facts
                              where e.FactType == FactType.Burial
                              select e).FirstOrDefault();
                if (burial != null)
                {
                    fact = new FactViewModel(burial);
                }
            }
            else
            {
                fact = new FactViewModel(death);
            }

            return(fact);
        }
Beispiel #2
0
        private FactViewModel GetBirth(Individual ind)
        {
            FactViewModel fact  = null;
            var           birth = (from Fact e in ind.Facts
                                   where e.FactType == FactType.Birth
                                   select e).FirstOrDefault();

            if (birth == null)
            {
                var baptism = (from Fact e in ind.Facts
                               where e.FactType == FactType.Baptism
                               select e).FirstOrDefault();
                if (baptism != null)
                {
                    fact = new FactViewModel(baptism);
                }
            }
            else
            {
                fact = new FactViewModel(birth);
            }

            return(fact);
        }
        private FactViewModel GetBirth(Individual ind)
        {
            FactViewModel fact = null;
            var birth = (from Fact e in ind.Facts
                             where e.FactType == FactType.Birth
                             select e).FirstOrDefault();
            if (birth == null)
            {
                var baptism = (from Fact e in ind.Facts
                                where e.FactType == FactType.Baptism
                                select e).FirstOrDefault();
                if (baptism != null)
                {
                    fact = new FactViewModel(baptism);
                }
            }
            else
            {
                fact = new FactViewModel(birth);
            }

            return fact;
        }
        private FactViewModel GetDeath(Individual ind)
        {
            FactViewModel fact = null;
            var death = (from Fact e in ind.Facts
                             where e.FactType == FactType.Death
                             select e).FirstOrDefault();
            if (death == null)
            {
                var burial = (from Fact e in ind.Facts
                                  where e.FactType == FactType.Burial
                                  select e).FirstOrDefault();
                if (burial != null)
                {
                    fact = new FactViewModel(burial);
                }
            }
            else
            {
                fact = new FactViewModel(death);
            }

            return fact;
        }