public ActionResult DisplayResult(NumericRequest req) { if (ModelState.IsValid) { double input = req.InputNum; var wm = new WordManager(); NumberPlaces places = wm.SplitNumber(input); var model = new NumbersAsWordsResponse(); model.FinalResult = wm.FormatOutput(places); return View(model); } return View("ConvertRequest", req); }
public ActionResult ConvertRequest() { var model = new NumericRequest(); return View(model); }