コード例 #1
0
        public ActionResult DeleteConfirm(int id)
        {
            ShowPiece piece = getShowPiece(id);

            if (piece == null)
            {
                return(RedirectToAction("Error"));
            }
            return(View(piece));
        }
コード例 #2
0
        private ShowPiece getShowPiece(int id)
        {
            ShowPiece piece = new ShowPiece();

            PieceDto pieceDto = getPieceDto(id);

            // If not successful, return null.
            if (pieceDto == null)
            {
                return(null);
            }

            piece.piece = pieceDto;
            piece.form  = getFormDto(pieceDto.formId);

            // Get only the techniques for this piece.
            piece.techniques = getTechniqueDtos(id);
            return(piece);
        }