コード例 #1
0
ファイル: RationController.cs プロジェクト: nathnael/cats
        //
        // 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));
        }
コード例 #2
0
ファイル: HRDController.cs プロジェクト: nathnael/cats
        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));
        }
コード例 #3
0
        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");
        }
コード例 #4
0
 public void loadLookups()
 {
     ViewBag.RegionalPSNPPlanID = new SelectList(_regionalPSNPPlanService.GetAllRegionalPSNPPlan(), "RegionalPSNPPlanID", "ShortName");
     ViewBag.RationID           = new SelectList(_rationService.GetAllRation(), "RationID", "RefrenceNumber");
 }