public ActionResult GetModelIntersectionParameters(string modelID1, string modelID2)
        {
            var j = Json(
                ((new SelectListItem[] { new SelectListItem {
                                             Text = "", Value = ""
                                         } })
                 .Union((from o in BlockModelService.GetModelParameterList(new Guid(modelID1))
                         join m in BlockModelService.GetModelParameterList(new Guid(modelID2))
                         on o.Text equals m.Text where o.Text != "" && o.Text != null
                         select o))
                 .OrderBy(f => f.Text))
                , JsonRequestBehavior.AllowGet);

            return(j);
        }
        public ActionResult CompareModel()
        {
            var model = new BlockModelCompareViewModel
            {
                Models = BlockModelService.GetModelListCurrent(),
                Report = AllReports.GetReport(AllReports.ReportType.CompareModel)
            };

            model.ParametersModel1 = model.Models.Any() ? BlockModelService.GetModelParameterList(new Guid(model.Models.First().Value)) : new SelectList(new SelectListItem[] { });
            model.DomainsModel1    = model.Models.Any() ? BlockModelService.GetModelDomainsList(new Guid(model.Models.First().Value)) : new SelectList(new SelectListItem[] { });
            model.DomainsModel2    = model.DomainsModel1;
            model.ParametersModel2 = model.ParametersModel1;
            model.ParametersIntersectionBothModels = model.ParametersModel1;
            return(View("CompareModel", model));
        }
 public ActionResult GetModelParameters(string modelID)
 {
     return(Json(BlockModelService.GetModelParameterList(new Guid(modelID))
                 , JsonRequestBehavior.AllowGet));
 }