Пример #1
0
        public IEnumerable <SelectListItem> GetAllArtists()
        {
            var types = _applicationUserQuery.ExecuteStoredProdure <ArtistViewModel>("spGetArtistUser").ToList().Select(x =>
                                                                                                                        new SelectListItem
            {
                Value = x.Id.ToString(),
                Text  = x.LastName + ' ' + x.FirstName
            }).AsEnumerable();

            return(new SelectList(types, "Value", "Text"));
        }
Пример #2
0
        // GET: EventApp/Event
        public async Task <ActionResult> Index()
        {
            try
            {
                if (TempData["MESSAGE"] != null)
                {
                    ViewBag.Msg = TempData["MESSAGE"] as string;
                }
                List <EventViewModel> eventmodel = await _EventQuery.ExecuteStoredProdure <EventViewModel>("spGetEvents").ToListAsync();

                _activityRepo.CreateActivityLog(string.Format("User ID:{0} viewed event list count of {1}", GetCurrentUserID(), eventmodel.Count), this.GetContollerName(), this.GetActionName(), GetCurrentUserID(), null);
                return(View(eventmodel));
            }
            catch (Exception exp)
            {
                _log.Error(exp);
                return(View("Error"));
            }
        }
Пример #3
0
        // GET: Portal/PortalUser
        public async Task <ActionResult> Index()
        {
            try
            {
                _log.Info("<<< In Portal User Page >>>");
                if (TempData["MESSAGE"] != null)
                {
                    ViewBag.Msg = TempData["MESSAGE"] as string;
                }
                var usermodel = await _applicationUserQuery.ExecuteStoredProdure <ArtistViewModel>("spGetArtistUser").ToListAsync();

                return(View(usermodel));
            }
            catch (Exception ex)
            {
                _log.Error(ex);
                return(View("Error"));
            }
        }