public ActionResult Register() { var licenseList = licenseRepository.GetAll(); var model = new RegisterViewModel(); model.LicenseList = licenseList; // model.Roles = CreateUserAllowedRoles; return(View(model)); }
public IEnumerable <LicenseViewModel> Get() { var licenses = _licenseRepository.GetAll().OrderBy(x => x.DisplayLineNo); if (licenses != null) { var destination = Mapper.Map <IEnumerable <License_M>, IEnumerable <LicenseViewModel> >(licenses); return(destination); } return(null); }
public ActionResult Customers() { var customers = userRepository.GetCustomers(); var companys = companyService.GetCompanysByCompanyIds(customers.Select(m => m.CompanyId).ToArray()); var licenses = licenseRepository.GetAll(); var usersInfo = customers.Select(m => new UserInfoViewModel() { Id = m.Id, FirstName = m.FirstName, LastName = m.LastName, Company = companys.Where(c => c.Id == m.CompanyId).First(), License = licenses.Where(l => l.Id == companys.Where(c => c.Id == m.CompanyId).First().LicenseId).First() }); return(View(usersInfo)); }
public IEnumerable <LicenseModel> GetAll() { var licenses = _licensesRepository.GetAll(); // Create BL instances from DAL instances var result = new List <LicenseModel>(); foreach (var license in licenses) { result.Add(new LicenseModel { Id = license.Id, Number = license.Number, }); } return(result); }
public IEnumerable <License> GetAll() { return(_licenseRepository.GetAll()); }