public ActionResult AddWoreda(int id) { //var donorCoverage = _hrdDonorCoverageService.FindById(id); ViewBag.RegionID = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name"); ViewBag.ZoneID = new SelectList(_adminUnitService.FindBy(m => m.AdminUnitTypeID == 3), "AdminUnitID", "Name"); ViewBag.WoredaID = new SelectList(_adminUnitService.FindBy(m => m.AdminUnitTypeID == 4), "AdminUnitID", "Name"); var addWoredaViewModel = new AddWoredaViewModel(); addWoredaViewModel.DonorCoverageID = id; return(PartialView(addWoredaViewModel)); }
public void LoadLookups() { ViewBag.RegionID = new SelectList(_adminUnitService.FindBy(t => t.AdminUnitTypeID == 2), "AdminUnitID", "Name"); ViewBag.RationID = new SelectList(_rationService.GetAllRation(), "RationID", "RefrenceNumber"); var psnpPlans = _planService.FindBy(p => p.ProgramID == 2); ViewBag.PlanId = new SelectList(_planService.FindBy(p => p.ProgramID == 2), "PlanID", "PlanName"); }
public IEnumerable <PSNPPlanDetailView> getRegionFDPs(int planID) { IEnumerable <AdminUnit> list = _adminUnitService.FindBy(m => m.ParentID == 4); return((from woreda in list select new PSNPPlanDetailView { ZoneID = woreda.AdminUnit2.AdminUnitID, ZoneName = woreda.AdminUnit2.Name, WoredaID = woreda.AdminUnitID, WoredaName = woreda.Name, //FDPID = fdp.FDPID, //FDPName = fdp.Name, BeneficiaryCount = 0, RegionalPSNPPlanID = planID } ).OrderBy(t => t.ZoneName).ThenBy(t => t.WoredaName)); }