Beispiel #1
0
        //
        // GET: /Instructor/Details/5

        public override ActionResult Details(string id)
        {
            Instructor instructor = _instructorWebService.Get(id);

            if (!string.IsNullOrWhiteSpace(instructor.Country))
            {
                ViewBag.Country = _countryWebService.Get(instructor.Country);
            }

            List <string> userIds = new List <string>();

            if (!string.IsNullOrWhiteSpace(instructor.ReferredBy))
            {
                userIds.Add(instructor.ReferredBy);
            }

            if (instructor.Payments != null && instructor.Payments.Any())
            {
                instructor.Payments.ForEach(x => userIds.Add(x.PaymentMadeBy));
            }

            ViewBag.Details = _userExtentions.GetUserDetails(userIds);

            SetupCourse(instructor);
            return(View(instructor));
        }
        public override ActionResult Details(string id)
        {
            Contact contact = _contactWebService.Get(id);

            ViewBag.Details = _userExtentions.GetUserDetails(contact.ReferredBy);
            ViewBag.Country = _countryWebService.Get(contact.Country);
            return(View(contact));
        }
        public override ActionResult Index()
        {
            IEnumerable <Activity> activities = _activityWebService.Get((int?)null);

            ViewBag.Details       = _userExtentions.GetUserDetails(activities.Select(x => x.AssignedTo)).ToList();
            ViewData["Activitys"] = activities;
            return(View());
        }
        //
        // GET: /Leads/

        //
        // GET: /Leads/Details/5

        public override ActionResult Details(string id)
        {
            Lead lead = _leadService.Get(id);

            ViewBag.Details = _userExtentions.GetUserDetails(new List <string> {
                lead.AssignedTo, lead.ReferredBy
            });
            ViewBag.Country = _countryWebService.Get(lead.Country);
            SetupCourse(lead);
            return(View("Details", lead));
        }
Beispiel #5
0
        public virtual ActionResult Index()
        {
            IEnumerable <T> enumerable = _tService.Get((int?)null);

            if (_userExtentions != null)
            {
                ViewBag.Details = _userExtentions.GetUserDetails(enumerable as IEnumerable <User>);
            }
            ViewData[GetName()] = enumerable;
            return(View());
        }