public ActionResult Adder(Int32 block, String type, String subtype, Int32?paragraph, Int32?teller, Int32?talk, Int32?page, Int32?piece) { var adder = new Adder(); adder.SetBlock(block); switch ((type + subtype).ToLower()) { case "pieceteller": adder.SetPieceTeller(block, piece ?? 0, teller ?? 0, talk ?? 0); break; case "piecetalk": adder.SetPieceTalk(block, piece ?? 0, talk ?? 0, teller ?? 0); break; case "paragraphteller": adder.SetParagraphTeller(block, paragraph ?? 0, teller ?? 0, talk ?? 0, page ?? 0); break; case "paragraphtalk": adder.SetParagraphTalk(block, paragraph ?? 0, teller ?? 0, talk ?? 0, page ?? 0); break; case "paragraphpage": adder.SetParagraphPage(block, paragraph ?? 0, teller ?? 0, talk ?? 0, page ?? 0); break; default: throw new Exception("Unknown Adder Type."); } return(PartialView(adder.View, adder.Model)); }