public ActionResult NewUser() { TempData["AccType"] = AccountTypeRepo.GetAll(); TempData["UserType"] = UserTypeRepo.GetAll(); TempData["UserStatus"] = UserStatusRepo.GetAll(); return(View()); }
public ActionResult Index() { List <UserType> usertypes = userTypeRepo.GetAll(); ViewBag.userTypes = usertypes; return(View()); }
public ActionResult Users() { List <User> users = userRepo.GetAll(); List <UserType> userTypes = userTypeRepo.GetAll(); ViewBag.allusers = users; ViewBag.alluserTypes = userTypes; return(View()); }
public async Task <IActionResult> Login(Guid shelterId) { ViewBag.UserAccounts = await _accountUserRepo.GetAll(); ViewBag.userTypes = await _userTypeRepo.GetAll(); if (shelterId.Equals(Guid.Empty)) { return(View(new AccountUser())); } else { return(View(await _accountUserRepo.GetById(shelterId))); } }
private void LoadUserTypeData() { TracktorDb context = new TracktorDb(); UserTypeRepository UserTypeRepo = new UserTypeRepository(context); List <UserTypeEntity> UserTypes = UserTypeRepo.GetAll().ToList(); AllUserTypes = new BindingList <UserTypeEntity>(UserTypes); }
public async Task <IActionResult> Index() { AccountUser use = new AccountUser(); ViewBag.userTypes = await _userTypeRepo.GetAll(); return(View(new AccountUser())); }
public List <SelectListItem> GetAllUserTypes() { IUserTypeRepository userTypeRepo = new UserTypeRepository(); List <SelectListItem> userTypeList = new List <SelectListItem>(); userTypeList = userTypeRepo.GetAll().Select(x => new SelectListItem() { Text = x.UserType, Value = x.ID.ToString() } ).ToList(); return(userTypeList); }
public static List <UserTypeData> GetUserTypes() { UserTypeRepository userTypeRep = new UserTypeRepository(); List <UserTypeData> userTypes = new List <UserTypeData>(); userTypeRep.GetAll().ToList().ForEach(x => userTypes.Add(new UserTypeData { Id = x.Id, Name = x.Name })); return(userTypes); }
public void GetAll_AllUserTypesReturned_CountEqualActual() { const int expectedCount = 2; int actualCount; using (var userTypeRepo = new UserTypeRepository(new brothershipEntities(ConnectionStrings.TEST_CONNECTION_STRING_NAME))) { actualCount = userTypeRepo.GetAll().Count(); } Assert.AreEqual(expectedCount, actualCount); }
public async Task <IActionResult> Index() { if (PasswordHash.userauth == null) { return(RedirectToAction("Login", "Account")); } IEnumerable <Shelter> shelters = await _shelterRepo.GetAll(); IEnumerable <Dog> dogs = await _dogRepo.GetAll(); ViewBag.userTypes = await _userTypeRepo.GetAll(); DisplayData displayData = new DisplayData { Shelters = shelters, Dogs = dogs, City = "Salt Lake City", StateCode = "UT" }; return(View(displayData)); }
public IHttpActionResult Get() { return(Ok(userTypeRepo.GetAll())); }
public IActionResult Get() { return(Ok(_userTypeRepository.GetAll())); }
/// <summary> /// The actual Work to be done. /// </summary> protected override void Execute() { MainFormModel mainFormModel = null; List <RepositoryModel> repositoryList = new List <RepositoryModel>(); List <CollectionModel> newlist = new List <CollectionModel>(); List <SubseryModel> newSubseriesList = new List <SubseryModel>(); List <SubjectModel> subjectList = new List <SubjectModel>(); List <KeywordModel> keywordList = new List <KeywordModel>(); List <UserTypeModel> userTypes = new List <UserTypeModel>(); //if (Request.IsStartup) //{ mainFormModel = new MainFormModel() { BrowseRecordCount = TranscriptionRepository.GetAll().Count(), TranscrptionQueueRecordCount = TranscriptionRepository.FindBy(t => t.TranscriptStatus == false).Count(), }; // collect repository details. List <repository> repositories = RepositoryRepository.GetRepositoriess(); foreach (repository item in repositories) { repositoryList.Add(Util.ConvertToRepositoryModel(item)); } // collect collection details. List <collection> collections = CollectionRepository.GetCollections().OrderBy(c => c.CollectionName).ToList(); foreach (collection item in collections) { newlist.Add(Util.ConvertToCollectionModel(item, repositories.First(c => c.Id == item.RepositoryId).RepositoryName)); } // collect subseries details. foreach (subsery item in SubseryRepository.GetSubseries().OrderBy(s => s.SubseriesName)) { newSubseriesList.Add(Util.ConvertToSubseryModel(item, collections.FirstOrDefault(s => s.Id == item.CollectionId).CollectionName)); } // collect subject details. foreach (subject item in SubjectRepository.GetSubjects()) { subjectList.Add(Util.ConvertToSubjectModel(item)); } // collect keywords details. foreach (keyword item in KeywordRepository.GetKeywords()) { keywordList.Add(Util.ConvertToKeywordModel(item)); } // collect user types details. foreach (usertype item in UserTypeRepository.GetAll()) { userTypes.Add(Util.ConvertToUsertypeModel(item)); } //} List <PredefinedUserModel> predefineUserList = Util.ConvertToPredefinedUserModel(PredefineUserRepository.GetPredefinedUsers()); List <string> audioEquipmentsUsed = AudioEquipmentUsedRepository.List(); List <string> videoEquipmentsUsed = VideoEquipmentUsedRepository.List(); Response = new ResponseModel() { Repositories = repositoryList, Subseries = newSubseriesList, Collections = newlist, Subjects = subjectList, Keywords = keywordList, PredefinedUsers = predefineUserList, AudioEquipmentsUsed = audioEquipmentsUsed, VideoEquipmentsUsed = videoEquipmentsUsed, UserTypes = userTypes, MainFormModel = mainFormModel, IsOperationSuccess = true }; }
public ActionResult SignUp() { TempData["UserType"] = UserTypeRepo.GetAll(); return(View()); }