Ejemplo n.º 1
0
        public ActionResult ViewOrderByCrafterID(int CrafterID)
        {
            ActionResult response;

            try
            {
                //mapping all the data to the view page
                List <OrdersDO> _Orders = _OrdersDAO.ViewOrderByCrafterID(CrafterID);
                List <OrdersPO> Orders  = Mapper.OrdersListDOtoPO(_Orders);
                //returning form view
                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 view
            return(response);
        }