public ActionResult Index(int?FinancialYearID) { VMLoggedUser LoggedInUser = Session["LoggedInUser"] as VMLoggedUser; if (FinancialYearID == null) { FinancialYearID = DDService.GetFinancialYear().OrderByDescending(aa => aa.PFinancialYearID).First().PFinancialYearID; } List <VMLeaveQuotaChild> vmList = new List <VMLeaveQuotaChild>(); ViewBag.FinancialYearID = new SelectList(DDService.GetFinancialYear().ToList().OrderBy(aa => aa.FYName).ToList(), "PFinancialYearID", "FYName", FinancialYearID); vmList = LeaveQuotaService.GetIndex((int)FinancialYearID, LoggedInUser); return(View(vmList)); }