public ActionResult GenerateInvoices() { List <Department> departments = DepartmentDao.GetAllDepartments(); Dictionary <int, string> monthDict = new Dictionary <int, string>(); foreach (var i in Enum.GetValues(typeof(Months))) { monthDict.Add((int)i, i.ToString()); } ViewData["Departments"] = departments; ViewData["MonthDict"] = monthDict; return(View("Invoices")); }