Example #1
0
        // GET: Account
        public ActionResult Index()
        {
            ActionResult response;

            try
            {
                List <EmployeeDO> allEmployees = _EmployeeDAO.ViewAll();
                List <EmployeePO> displayList  = EmployeeMapper.DOToPO(allEmployees);
                response = View(displayList);
            }
            catch (SqlException ex)
            {
                TempData["ErrorMessage"] = "Sorry, we encountered an issue";
                response = View();
            }
            return(response);
        }