Beispiel #1
0
        public void SeedCodecoolersQuests()
        {
            CodecoolerQuestDAO codecoolersQuestsDAO = (CodecoolerQuestDAO)CodecoolerQuestDAO;
            var allCodecoolersQuests = codecoolersQuestsDAO.ReadAllEntities();

            var allCodecoolersQuestsWithNames = new List <CodecoolerQuest>();

            foreach (var quest in allCodecoolersQuests)
            {
                quest.CodecoolerNames = UserDAO.ReadEntityByID(quest.CodecoolerId).FirstName + " " + UserDAO.ReadEntityByID(quest.CodecoolerId).LastName;
                quest.QuestName       = QuestDAO.ReadEntityByID(quest.QuestId).Name;
                allCodecoolersQuestsWithNames.Add(quest);
            }

            this.CodecoolersQuestList = allCodecoolersQuests;
        }
Beispiel #2
0
        public void SeedCodecoolersQuests(int id)
        {
            CodecoolerQuestDAO codecoolersQuestsDAO = (CodecoolerQuestDAO)CodecoolerQuestDAO;
            var allCodecoolersQuests = codecoolersQuestsDAO.ReadEntitiesByCodecoolerID(id);

            var allCodecoolersQuestsWithNames = new List <CodecoolerQuest>();

            foreach (var quest in allCodecoolersQuests)
            {
                quest.QuestName = QuestDAO.ReadEntityByID(quest.QuestId).Name;
                if (quest.ApproverId != null)
                {
                    quest.AprroverNames = UserDAO.ReadEntityByID((int)quest.ApproverId).FirstName + " " + UserDAO.ReadEntityByID((int)quest.ApproverId).LastName;
                }
                allCodecoolersQuestsWithNames.Add(quest);
            }

            this.CodecoolersQuestList = allCodecoolersQuests;
        }
Beispiel #3
0
 public void SeedQuestById(int id)
 {
     this.Entity = QuestDAO.ReadEntityByID(id);
 }