// This is a staff-only method public ActionResult List() { var data = MentorHelper.GetMentors(ref _db); ViewBag.Mentors = data.ToList(); return(View()); }
public MenteeController() { ViewBag.MenteesDropDownList = MentorHelper.GetMenteesDropdownList(ref this._db); ViewBag.MentorsDropDownList = MentorHelper.GetMentorsDropdownList(ref this._db); ViewBag.Mentees = MentorHelper.GetMentees(ref this._db); ViewBag.Mentors = MentorHelper.GetMentors(ref this._db); ViewBag.States = _db.StateList; ViewBag.Cities = _db.CityList; ViewBag.Prefixes = _db.Prefixes; ViewBag.Suffixes = _db.Suffixes; ViewBag.Genders = _db.Genders; ViewBag.Races = _db.Races; ViewBag.YesNoList = _db.YesNoList; }
public MentorController() { ViewBag.UserId = base._userId; ViewBag.Logs = ContactLogHelper.GetContactLogsByMentorId(ref this._db, _userId).Take(3); ViewBag.Messages = MessagingHelper.GetMessagesToUserId(ref this._db, _userId).Take(3); ViewBag.Events = CalendarHelper.GetEventsByUserId(ref this._db, _userId).Take(3); ViewBag.Resources = ResourceHelper.GetResources(ref this._db).Take(3); ViewBag.Mentees = MentorHelper.GetMenteesDropdownList(ref this._db); ViewBag.Ministries = MinistryHelper.GetMinistriesDropdownList(ref this._db); ViewBag.ContactTypes = this._db.ContactTypes; ViewBag.Ministries = _db.MinistriesList; ViewBag.States = _db.StateList; ViewBag.Cities = _db.CityList; ViewBag.Prefixes = _db.Prefixes; ViewBag.Suffixes = _db.Suffixes; ViewBag.Genders = _db.Genders; ViewBag.Races = _db.Races; ViewBag.YesNoList = _db.YesNoList; Mapper.CreateMap <ContactLog, ContactLogViewModel>(); Mapper.CreateMap <ContactLogViewModel, ContactLog>(); }
// This method returns the Edit View public ActionResult Edit(int id) { MentorViewModel viewModel = MentorHelper.GetMentorById(ref _db, id); return(View(viewModel)); }