public void LookUps() { var userRegionID = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).RegionID; var regions = _commonService.GetRegions(); if (userRegionID != null) { regions = _commonService.FindBy(m => m.AdminUnitID == userRegionID); } var lossReasons = _lossReasonService.GetAllLossReason().Select(t => new { name = t.LossReasonCodeEg + "-" + t.LossReasonEg, Id = t.LossReasonId }); ViewData["LossReasons"] = lossReasons; ViewBag.Region = new SelectList(regions, "AdminUnitID", "Name", "--Select Region--"); ViewBag.Zone = new SelectList(_commonService.FindBy(m => m.AdminUnitTypeID == 3 && m.ParentID == 3), "AdminUnitID", "Name"); ViewBag.Woreda = new SelectList(_commonService.FindBy(m => m.AdminUnitTypeID == 4 && m.ParentID == 19), "AdminUnitID", "Name"); ViewBag.ProgramID = new SelectList(_commonService.GetPrograms(), "ProgramID", "Name"); //ViewBag.Month = new SelectList(RequestHelper.GetMonthList(), "Id", "Name"); ViewBag.SupportTypeID = new SelectList(_commonService.GetAllSupportType(), "SupportTypeID", "Description"); }
public ActionResult Index(int regionID) { ViewBag.RegionID = regionID; ViewBag.Region = _adminUnitService.FindById(regionID).Name; var zonesList = _adminUnitService.GetAllZones(regionID); ViewBag.ZoneCollection = BindZoneViewModel(zonesList); var lossReasons = _lossReasonService.GetAllLossReason().Select(t => new { name = t.LossReasonCodeEg + "-" + t.LossReasonEg, Id = t.LossReasonId }); ViewData["LossReasons"] = lossReasons; return(View()); }
public ActionResult Index() { var lossReasons = _lossReasonService.GetAllLossReason(); return(View(lossReasons)); }