public ActionResult EditCompanyFeatureList(string id) { CreateCompanyFeatureListModel model = new CreateCompanyFeatureListModel(); FeatureSet featureSet = featureSetService.GetSingle(id, AuthenticationHelper.CompanyId.Value); model.CompanyId = AuthenticationHelper.CompanyId.Value; var featureList = service.GetAll(AuthenticationHelper.CompanyId.Value, AuthenticationHelper.UserRole, featureSet.AccessType).ToList(); model.FeatureList = featureList.Select(x => new FeatureViewModel(x)).ToList(); model.Id = featureSet.Id; model.Name = featureSet.Name; model.SelectedFeatures = featureSetListService.GetByFeatureSetId(Convert.ToInt32(id)).ToDictionary(a => a.FeatureId, a => a.FeatureId); return View(model); }
public ActionResult CreateCompanyFeatureList() { var featureList = service.GetAll(AuthenticationHelper.CompanyId.Value, AuthenticationHelper.UserRole, "company").ToList(); CreateCompanyFeatureListModel model = new CreateCompanyFeatureListModel(); model.CompanyId = AuthenticationHelper.CompanyId.Value; model.FeatureList = featureList.Select(x => new FeatureViewModel(x)).ToList(); return View(model); }