public void PopulateDropDownList()
 {
     ViewData["CropList"] = new SelectList(cropRepoInterface.ListAllCrops(), "CropID", "CropName");
     ViewData["FarmList"] = new SelectList(farmRepoInterface.ListAllFarms(), "FarmID", "FarmName");
 }
Пример #2
0
 public void OnGet(string returnUrl = null)
 {
     ViewData["Farms"] = new SelectList(_farmRepo.ListAllFarms(), "FarmID", "FarmName");
     ReturnUrl         = returnUrl;
 }