コード例 #1
0
        public void FindTeaser(AdminTeasersViewModel adminTeaserViewModel)
        {
            TeaserEntityDL teaserFromDB = dbRepository.GetTeaserData(GetIdTeaser());

            if (teaserFromDB == null)
            {
                TeaserOld = new TeaserEntity(0, "Die angaben wurden nicht gelesen", "", DateTime.Today, string.Empty);
            }

            TeaserOld = new TeaserEntity(teaserFromDB.Id, teaserFromDB.Title, teaserFromDB.Text, teaserFromDB.DateOfTeaser, pathToDisplayImages + teaserFromDB.ImageName + ".jpg");
            TeaserNew = TeaserOld;
        }
コード例 #2
0
        public void GetTeaser(int teaserId)
        {
            TeaserEntityDL teaserFromDB = dbRepository.GetTeaserData(teaserId);

            Teaser = new TeaserEntity(teaserFromDB.Id, teaserFromDB.Title, teaserFromDB.Text, teaserFromDB.DateOfTeaser, pathToDisplayImages + teaserFromDB.ImageName + ".jpg");
        }