public async Task <ActionResult> Result(IndexFitLocationViewModel viewModel) { if (!ModelState.IsValid) { return(View("Index", viewModel)); } BoxLocation boxLocation = new BoxLocation() { Location = new Location() { Length = viewModel.LocL, Width = viewModel.LocW, Height = viewModel.LocH }, Box = new Box() { Length = viewModel.BoxL, Width = viewModel.BoxW, Height = viewModel.BoxH } }; string result = await SaveProduct(boxLocation); result = result.Trim(new Char[] { ' ', '"' }); result = result.Replace(@"\n", Environment.NewLine); return(View(new ResultFixLocationViewModel() { Result = result //Result = "Location: LWH\nBox : LWH\n\n52 ÷ 5 = 10 go back\n10 ÷ 5 = 2 go across\n15 ÷ 5 = 3 go up\n\nNumber total of boxes: 60\n\nInches Left\nL: 2\nW: 0\nH: 0\n" })); }
// GET: FitLocation public ActionResult Index() { var viewModel = new IndexFitLocationViewModel(); return(View(viewModel)); }