public ActionResult create() { ViewBag.Classification = _ClassRep.GetAll(); ViewBag.Sources = _SourceRep.GetAll(); return(View( )); }
public ActionResult Index() { if (string.IsNullOrEmpty(User.Identity.Name)) { return(RedirectToAction("Login", "Account")); } using (UserRepository user = new UserRepository()) { ViewBag.IsAdmin = user.IsAdmin(User.Identity.Name); } ViewBag.Title = "Customer List"; CustomerViewModel model = new CustomerViewModel(); using (GenderRepository gender = new GenderRepository()) model.Genders = gender.GetAll(); using (RegionRepository region = new RegionRepository()) model.Regions = region.GetAll(); using (CityRepository city = new CityRepository()) model.Cities = city.GetAll(); using (ClassificationRepository classification = new ClassificationRepository()) model.Classifications = classification.GetAll(); using (UserRepository user = new UserRepository()) model.Sellers = user.GetAll(); return(View(model)); }
public static List <Classification> GetAllClassifications() => ClassificationRepository.GetAll();
public ActionResult Index() { return(View(_rep.GetAll())); }