Пример #1
0
        public ActionResult <object> GetAward(string id)
        {
            var award      = _awardDefinitionService.Get(id);
            var conditions = _awardDefinitionService.GetConditions(award.AwardDefinitionID);
            var allEvents  = _eventDefinitionService.GetAll();
            var container  = new { Award = award, Conditions = conditions, AllEvents = allEvents };

            return(container);
        }
        public ViewResult Award(string id)
        {
            var award = _awardDefinitionService.Get(id);

            if (award == null)
            {
                return(this.NotFound("NotFound", null));
            }
            var selectList = new SelectList(_eventDefinitionService.GetAll(), "EventDefinitionID", "EventDefinitionID");

            ViewBag.EventList  = selectList;
            ViewBag.Conditions = _awardDefinitionService.GetConditions(id);
            return(View(award));
        }