public IActionResult AddField() { var land = _landService.GetAllLandForList(userId); if (land.Count == 0) { return(RedirectToAction("LandDontExist")); } //Dropdown list with plot number var landSelectList = _landService.GetAllLandForSelectList(userId); //Dropdown list with agricultural Class var agrClassSelectList = _agriculturalClassService.GetAllAgriculturalClassForSelectList(); var viewModel = new NewFieldVm() { Lands = landSelectList, AgriculturalClasses = agrClassSelectList }; return(View(viewModel)); }
public IActionResult Index() { var model = _landService.GetAllLandForList(userId); return(View(model)); }