public JsonResult GetAllCustomerTypes() { var result = commodityTypeRepository.GetAllCustomerTypes().Select(s => new { s.CustomerTypeID, s.Name }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); }
public void BuildSelectLists(CustomerViewModel customerViewModel) { customerViewModel.CustomerCategoryDropDown = customerCategorySelectListBuilder.BuildSelectListItemsForCustomerCategories(customerCategoryRepository.GetAllCustomerCategories()); customerViewModel.CustomerTypeDropDown = customerTypeSelectListBuilder.BuildSelectListItemsForCustomerCategories(customerTypeRepository.GetAllCustomerTypes()); }