Beispiel #1
0
        public HeaderViewModel()
        {
            HeaderEntityDL headerFromDB = dbRepository.GetHeaderData();

            Header = new HeaderEntity(); Header.Link1 = new LinkHeader(); Header.Link2 = new LinkHeader();

            Header.Title             = headerFromDB.Title ?? "Die angaben wurden nicht gelesen.";
            Header.Text              = headerFromDB.Text ?? string.Empty;
            Header.Link1.LinkText    = headerFromDB.Link1.LinkText ?? string.Empty;
            Header.Link1.LinkAddress = headerFromDB.Link1.LinkAddress ?? string.Empty;
            Header.Link2.LinkText    = headerFromDB.Link2.LinkText ?? string.Empty;
            Header.Link2.LinkAddress = headerFromDB.Link2.LinkAddress ?? string.Empty;
        }
        public AdminHeaderViewModel()
        {
            HeaderEntityDL headerFromDB = dbRepository.GetHeaderData();

            HeaderOld = new HeaderEntity(); HeaderOld.Link1 = new LinkHeader(); HeaderOld.Link2 = new LinkHeader();
            HeaderNew = new HeaderEntity(); HeaderNew.Link1 = new LinkHeader(); HeaderNew.Link2 = new LinkHeader();

            HeaderOld.Title             = headerFromDB.Title ?? "Die angaben wurden nicht gelesen.";
            HeaderOld.Text              = headerFromDB.Text;
            HeaderOld.Link1.LinkText    = headerFromDB.Link1.LinkText;
            HeaderOld.Link1.LinkAddress = headerFromDB.Link1.LinkAddress;
            HeaderOld.Link2.LinkText    = headerFromDB.Link2.LinkText;
            HeaderOld.Link2.LinkAddress = headerFromDB.Link2.LinkAddress;

            HeaderNew = HeaderOld;
        }