public ActionResult ISection(ISectionViewModel viewModel)
        {
            var resultViewModel = this.performCalculations <ISectionViewModel>(viewModel);

            ViewBag.HasResult = true;
            return(View(resultViewModel));
        }
        public ActionResult ISection()
        {
            ViewBag.ShowResults = false;
            ViewBag.InputErrors = false;
            var viewModel = new ISectionViewModel
            {
                WebThickness          = "0.2",
                TopFlangeThickness    = "0.2",
                TopFlangeWidth        = "1",
                Height                = "2",
                BottomFlangeThickness = "0.1",
                BottomFlangeWidth     = "0.5",
            };

            ViewBag.HasResult = false;
            return(View(viewModel));
        }
예제 #3
0
 public Section(ISectionView sectionView)
 {
     SectionContent = sectionView.ThrowIfNull(nameof(sectionView));
     _viewModel     = sectionView.ViewModel.ThrowIfNull(nameof(sectionView.ViewModel));
     Title          = sectionView.Title;
 }
예제 #4
0
 public CsrSectionControl(ISectionViewModel viewModel)
 {
     InitializeComponent();
     ViewModel   = viewModel.ThrowIfNull(nameof(viewModel));
     DataContext = viewModel;
 }