// // GET: /EarlyWarning/Ration/ public ActionResult Index() { var rations = _rationService.GetAllRation(); var rationViewModels = (from item in rations select BindRationViewModel(item)).OrderBy(o => o.ReferenceNumber); return(View(rationViewModels)); }
public ActionResult Create() { var hrd = new HRD(); // hrd.HRDDetails = new List<HRDDetail>(); //ViewBag.Year = DateTime.Today.Year; ViewBag.RationID = new SelectList(_rationService.GetAllRation(), "RationID", "RefrenceNumber", hrd.RationID = 1); ViewBag.NeedAssessmentID = new SelectList(_needAssessmentService.GetAllNeedAssessmentHeader().Where(m => m.NeedAssessment.NeedAApproved == true), "NAHeaderId", "NeedACreatedDate"); ViewBag.PlanID = new SelectList(_hrdService.GetPlans(), "PlanID", "PlanName"); ViewBag.SeasonID = new SelectList(_seasonService.GetAllSeason(), "SeasonID", "Name", 0); return(View(hrd)); }
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 void loadLookups() { ViewBag.RegionalPSNPPlanID = new SelectList(_regionalPSNPPlanService.GetAllRegionalPSNPPlan(), "RegionalPSNPPlanID", "ShortName"); ViewBag.RationID = new SelectList(_rationService.GetAllRation(), "RationID", "RefrenceNumber"); }