Esempio n. 1
0
        public ActionResult ViewByStatus(byte status)
        {
            ActionResult response;

            try
            {
                //mapping all the data to the view page
                List <OrdersDO> _Orders = _OrdersDAO.ViewOrderByStatus(status);
                List <OrdersPO> Orders  = Mapper.OrdersListDOtoPO(_Orders);
                response = View(Orders);
            }
            //logging errors and redirecting
            catch (SqlException sqlEx)
            {
                Logger.SqlErrorLog(sqlEx);
                response = View("Error");
            }
            catch (Exception ex)
            {
                Logger.ErrorLog(ex);
                response = View("Error");
            }
            return(response);
        }