public ContactsController( IContactRepository contactRepo, ILookupRepository lookupRepo, ACDBContext ctx) { _ctx = ctx; _contactRepo = contactRepo; _lookupRepo = lookupRepo; ViewBag.PossiblePrefixes = _lookupRepo.GetPrefixes(); ViewBag.PossibleSuffixes = _lookupRepo.GetSuffixes(); ViewBag.PossibleGenders = _lookupRepo.GetGenders(); ViewBag.PossibleRaces = _lookupRepo.GetRaces(); ViewBag.PossibleLicenseTypes = _lookupRepo.GetLicenseTypes(); ViewBag.PossibleEyeColors = _lookupRepo.GetEyeColors(); ViewBag.PossibleHairColors = _lookupRepo.GetHairColors(); ViewBag.PossibleHairPatterns = _lookupRepo.GetHairPatterns(); ViewBag.PossibleStates = _lookupRepo.GetStates(); ViewBag.PossibleMaritialStatus = _lookupRepo.GetMaritialStatuses(); ViewBag.PossibleAddressTypes = _lookupRepo.GetAddressTypes(); ViewBag.PossibleApprovalStatus = _lookupRepo.GetApprovalStatuses(); ViewBag.PossibleActiveStatus = _lookupRepo.GetActiveStatuses(); ViewBag.PossibleRemovalStatus = _lookupRepo.GetRemovalStatus(); ViewBag.PossiblePrimaryStatus = _lookupRepo.GetPrimaryStatuses(); ViewBag.PossibleContactType = _lookupRepo.GetContactTypes(); ViewBag.PossibleContactTopic = _lookupRepo.GetContactTopics(); }
public SubscriptionsController( ILookupRepository lookupRepo, ISubscriptionRepository subscriptionRepo) { _lookupRepo = lookupRepo; _subscriptionRepo = subscriptionRepo; ViewBag.PossiblePrimaryStatuses = _lookupRepo.GetPrimaryStatuses().OrderBy(x => x.SortOrder); ViewBag.PossibleApprovalStatus = _lookupRepo.GetApprovalStatuses().OrderBy(x => x.SortOrder); ViewBag.PossibleActiveStatus = _lookupRepo.GetActiveStatuses().OrderBy(x => x.SortOrder); ViewBag.PossibleMovementClasses = _lookupRepo.GetMovementClasses().OrderBy(x => x.SortOrder); ViewBag.PossibleRemovalStatuses = _lookupRepo.GetRemovalStatus().OrderBy(x => x.SortOrder); }
public ActionResult Create() { ViewBag.PossibleConfidentialityTypes = _lookupRepo.GetConfidentialityTypes().OrderBy(x => x.SortOrder); var subscription = new Subscription { //ActiveStatusId = Queryable.SingleOrDefault(_lookupRepo.GetActiveStatuses(), p => p.Name.Equals("Active")).Id, ActiveStatusId = _lookupRepo.GetActiveStatuses().FirstOrDefault(e => e.Name.Equals("New")).Id, //SubscriptionRate = DateTime.Now, CreatedUserId = 1, DateCreated = DateTime.Now, ModifiedUserId = 1, DateModified = DateTime.Now, }; return(View(subscription)); }
public EventsController( ILookupRepository lookupRepo, IEventRepository eventRepo, ACDBContext ctx) { _lookupRepo = lookupRepo; _eventRepo = eventRepo; _ctx = ctx; ViewBag.PossibleEventDocumentationTypes = _lookupRepo.GetEventDocumentationTypes(); ViewBag.PossibleEventTypes = _lookupRepo.GetEventTypes(); ViewBag.PossibleWebIncidentTypes = _lookupRepo.GetWebIncidentTypes(); ViewBag.PossibleApprovalStatus = _lookupRepo.GetApprovalStatuses(); ViewBag.PossibleActiveStatus = _lookupRepo.GetActiveStatuses(); ViewBag.PossibleMovementClasses = _lookupRepo.GetMovementClasses(); ViewBag.PossibleRemovalStatus = _lookupRepo.GetRemovalStatus(); ViewBag.PossiblePrimaryStatus = _lookupRepo.GetPrimaryStatuses(); ViewBag.PossibleNewsSources = _lookupRepo.GetNewsSources(); ViewBag.PossibleReligions = _lookupRepo.GetReligions(); }