public static watershed_village_data GetVillageDataList(watershed_village_data vil) { BOM.watershed_village_data list = DAL.VillageDataDal.getVillageDataById(vil.vd_id); return(list); }
public ActionResult VillageDetails(int? Id) { BOM.watershed_village_data d = DAL.VillageDataDal.getVillageDataById(Id); List<BOM.watershed_policy> policy = DAL.VillageDataDal.GetPolicyYear(d); ViewData.Add("policy", policy); List<watershed_crop> list = DAL.CropDal.GetListCrop(); if (null != policy && null != list) { foreach (watershed_policy pol in policy) foreach (watershed_crop crop in list) { if (pol.crop_id == crop.crop_id) pol.watershed_crop = crop; } } return View(d); }