コード例 #1
0
        private static void GetPreconfiguredTitelSet(InsuranceDbContext context)
        {
            var titel = Stammdaten.GetTitel();

            string firstDimension  = "";
            string secondDimension = "";

            for (int i = 0; i < titel.GetLength(0); ++i)
            {
                for (int j = 0; j < titel.GetLength(1); ++j)
                {
                    if (j == 0)
                    {
                        firstDimension = titel[i, j];
                    }
                    else
                    {
                        secondDimension = titel[i, j];
                    }
                }

                context.TitelSet.Add(new Titel
                {
                    Id = i + 1,
                    BezeichnungKurz = firstDimension,
                    Beschreibung    = secondDimension
                });
            }
        }
コード例 #2
0
        private static void GetPreconfiguredBerufe(InsuranceDbContext context)
        {
            string[] berufe = Stammdaten.GetBerufe();

            for (int i = 0; i < berufe.Length; ++i)
            {
                context.Berufe.Add(new Beruf
                {
                    Id   = i + 1,
                    Name = berufe[i]
                });
            }
        }
コード例 #3
0
        private static void GetPreconfiguredDokumentArt(InsuranceDbContext context)
        {
            string[] dokumentArtList = Stammdaten.GetDokumentArtList();

            for (int i = 0; i < dokumentArtList.Length; ++i)
            {
                context.DokumentArtSet.Add(new DokumentArt()
                {
                    Id   = i + 1,
                    Name = dokumentArtList[i]
                });
            }
        }
コード例 #4
0
        private static void GetPreconfiguredLänder(InsuranceDbContext context)
        {
            string[] länder = Stammdaten.GetLänder();

            for (int i = 0; i < länder.Length; ++i)
            {
                context.Länder.Add(new Land()
                {
                    Id   = i + 1,
                    Name = länder[i]
                });
            }
        }