public ActionResult PedDelayOptions(int id) { MOE.Common.Business.WCFServiceLibrary.PedDelayOptions pedDelayOptions = new MOE.Common.Business.WCFServiceLibrary.PedDelayOptions(); pedDelayOptions.SetDefaults(); return(PartialView("PedDelayOptions", pedDelayOptions)); }
public ActionResult GetPedDelayMetric(MOE.Common.Business.WCFServiceLibrary.PedDelayOptions metricOptions) { metricOptions.MetricType = GetMetricType(metricOptions.MetricTypeID); string[] result = new string[1] { "" }; if (ModelState.IsValid) { MetricGeneratorService.MetricGeneratorClient client = new MetricGeneratorService.MetricGeneratorClient(); try { client.Open(); result = client.CreateMetric(metricOptions); client.Close(); } catch (Exception ex) { client.Close(); return(Content("<h1>" + ex.Message + "</h1>")); } } return(PartialView("MetricResult", result)); }
public ActionResult MetricOptions(int id) { switch (id) { case 1: MOE.Common.Business.WCFServiceLibrary.PhaseTerminationOptions phaseTerminationOptions = new MOE.Common.Business.WCFServiceLibrary.PhaseTerminationOptions(); phaseTerminationOptions.SetDefaults(); return(PartialView("PhaseTerminationOptions", phaseTerminationOptions)); case 2: MOE.Common.Business.WCFServiceLibrary.SplitMonitorOptions SplitMonitorOptions = new MOE.Common.Business.WCFServiceLibrary.SplitMonitorOptions(); return(PartialView("SplitMonitorOptions", SplitMonitorOptions)); case 3: MOE.Common.Business.WCFServiceLibrary.PedDelayOptions pedDelayOptions = new MOE.Common.Business.WCFServiceLibrary.PedDelayOptions(); pedDelayOptions.SetDefaults(); return(PartialView("PedDelayOptions", pedDelayOptions)); case 5: MOE.Common.Business.WCFServiceLibrary.TMCOptions tMCOptions = new MOE.Common.Business.WCFServiceLibrary.TMCOptions(); tMCOptions.SetDefaults(); return(PartialView("TMCOptions", tMCOptions)); case 4: MOE.Common.Business.WCFServiceLibrary.MetricOptions preemptOptions = new MOE.Common.Business.WCFServiceLibrary.MetricOptions(); preemptOptions.YAxisMax = 3; preemptOptions.Y2AxisMax = 10; return(PartialView("PreemptOptions", preemptOptions)); case 6: MOE.Common.Business.WCFServiceLibrary.PCDOptions pcdOptions = new MOE.Common.Business.WCFServiceLibrary.PCDOptions(); return(PartialView("PCDOptions", pcdOptions)); case 7: MOE.Common.Business.WCFServiceLibrary.ApproachVolumeOptions approachVolumeOptions = new MOE.Common.Business.WCFServiceLibrary.ApproachVolumeOptions(); return(PartialView("ApproachVolumeOptions", approachVolumeOptions)); case 8: MOE.Common.Business.WCFServiceLibrary.ApproachDelayOptions approachDelayOptions = new MOE.Common.Business.WCFServiceLibrary.ApproachDelayOptions(); approachDelayOptions.SetDefaults(); return(PartialView("ApproachDelayOptions", approachDelayOptions)); case 9: MOE.Common.Business.WCFServiceLibrary.AoROptions aoROptions = new MOE.Common.Business.WCFServiceLibrary.AoROptions(); aoROptions.SetDefaults(); return(PartialView("AoROptions", aoROptions)); case 10: MOE.Common.Business.WCFServiceLibrary.ApproachSpeedOptions approachSpeedOptions = new MOE.Common.Business.WCFServiceLibrary.ApproachSpeedOptions(); approachSpeedOptions.SetDefaults(); return(PartialView("ApproachSpeedOptions", approachSpeedOptions)); case 11: MOE.Common.Business.WCFServiceLibrary.YellowAndRedOptions yellowAndRedOptions = new MOE.Common.Business.WCFServiceLibrary.YellowAndRedOptions(); yellowAndRedOptions.SetDefaults(); return(PartialView("YellowAndRedOptions", yellowAndRedOptions)); case 12: default: MOE.Common.Business.WCFServiceLibrary.SplitFailOptions splitFailOptions = new MOE.Common.Business.WCFServiceLibrary.SplitFailOptions(); splitFailOptions.SetDefaults(); return(PartialView("SplitFailOptions", splitFailOptions)); } }