public ActionResult New(int instructionId)
        {
            var instructionPageViewModel = new InstructionPageViewModel();

            instructionPageViewModel.InstructionId   = instructionId;
            instructionPageViewModel.PartDtos        = partService.GetAll();
            instructionPageViewModel.InstructionDtos = instructionService.GetAll();

            return(View("InstructionPageForm", instructionPageViewModel));
        }
        public IHttpActionResult GetAll()
        {
            var instructions = instructionService.GetAll();

            if (instructions == null)
            {
                return(NotFound());
            }

            return(Ok(instructions));
        }
        public ActionResult Index()
        {
            var instructionDtos       = instructionService.GetAll();
            var instructionsViewModel =
                Mapper.Map <IEnumerable <InstructionViewModel> >(instructionDtos);

            if (User.IsInRole(RoleName.Admin) || User.IsInRole(RoleName.Manager))
            {
                return(View("InstructionsList", instructionsViewModel));
            }
            else
            {
                return(View("InstructionsReadOnlyList", instructionsViewModel));
            }
        }