public async Task <ActionResult> GetDuctResultList(DuctDesignViewModel ddvm) { ddvm.RelativeRoughness = ddvm.RelativeRoughness / 1000.0; ddvm.Temperature = Calculations.ToKelvin(ddvm.Temperature); ddvm.RectangularDuctHeight = ddvm.RectangularDuctHeight / 1000.0; DuctDesigner ductDesigner = new DuctDesigner(); DuctSelectionResultViewModel model = ductDesigner.GetDuctSelectionResultViewModel(ddvm); return(PartialView("_DructSeletionResultView", model)); }
public DuctSelectionResultViewModel GetDuctSelectionResultViewModel(DuctDesignViewModel ddvm) { DuctSelectionResultViewModel model = new DuctSelectionResultViewModel(); model.SelectionType = ddvm.SelectionType; model.TargetValue = ddvm.TargetValue; model.RoundDucts = (new RoundDuctDesigner()).GetRoundDuctList(ddvm); model.RectangularDucts = (new RectangularDuctDesigner()).GetRoundDuctList(ddvm); return(model); }