Ejemplo n.º 1
0
        public SessionClassController(ISessionClassService SessionClassService, ISessionTopicService SessionTopicService, ISessionRoomService SessionRoomService)
        {
            _SessionClassService = SessionClassService;
            _SessionTopicService = SessionTopicService;
            _SessionRoomService  = SessionRoomService;

            var topics = _SessionTopicService.GetAll();

            foreach (var t in topics)
            {
                topicItems.Add(new SelectListItem()
                {
                    Text = t.Name, Value = t.Id.ToString()
                });
            }

            ViewBag.topicItems = topicItems;

            var rooms = _SessionRoomService.GetAll();

            foreach (var t in rooms)
            {
                roomItems.Add(new SelectListItem()
                {
                    Text = t.Name, Value = t.Id.ToString()
                });
            }

            ViewBag.roomItems = roomItems;
        }
Ejemplo n.º 2
0
 public void Initialize()
 {
     _mockRepository   = new Mock <ISessionTopicRepository>();
     _mockUnitWork     = new Mock <IUnitOfWork>();
     _service          = new SessionTopicService(_mockUnitWork.Object, _mockRepository.Object);
     listSessionTopics = new List <SessionTopic>()
     {
         new SessionTopic()
         {
             Name = "XML"
         },
         new SessionTopic()
         {
             Name = "HTML"
         },
         new SessionTopic()
         {
             Name = "JavaScript"
         }
     };
 }
Ejemplo n.º 3
0
 public SessionTopicController(ISessionTopicService SessionTopicService)
 {
     _SessionTopicService = SessionTopicService;
 }