public ActionResult DisplayDef(StatFieldViewModel viewModel, StatComplexFieldRepository repository) { for (int i = 0; i < repository.FieldList.Count; i++) { if (i == (int)viewModel.FieldName.GetStatRuIndex() + StatValueChoiceQueries.Choices.Count() || i == (int)viewModel.FieldName.GetStatValueIndex() || repository.FieldList[i].IntervalList.Count == 0) { repository.FieldList[i].AutoGenerateIntervals( viewModel.FieldLength, viewModel.ColorThemeDescription.GetColorThemeIndex()); } } GenerateValuesMrsService service = new GenerateValuesMrsService(RutraceStatContainer.MrsStats); return View(new StatFieldViewModel(repository[viewModel.FieldName], service.GenerateValues(viewModel.FieldName)) { FieldLength = viewModel.FieldLength, ColorThemeDescription = viewModel.ColorThemeDescription }); }
public ActionResult DisplayDef(StatFieldViewModel viewModel, StatComplexFieldRepository repository) { for (int i = 0; i < repository.FieldList.Count; i++) { if (i == (int)viewModel.FieldName.GetStatRuIndex() + StatValueChoiceQueries.Choices.Count() || i == (int)viewModel.FieldName.GetStatValueIndex() || repository.FieldList[i].IntervalList.Count == 0) { repository.FieldList[i].AutoGenerateIntervals( viewModel.FieldLength, viewModel.ColorThemeDescription.GetColorThemeIndex()); } } GenerateValuesMrsService service = new GenerateValuesMrsService(RutraceStatContainer.MrsStats); return(View(new StatFieldViewModel(repository[viewModel.FieldName], service.GenerateValues(viewModel.FieldName)) { FieldLength = viewModel.FieldLength, ColorThemeDescription = viewModel.ColorThemeDescription })); }