public ActionResult UpDownMethod(int udg_id) { UpDownMethodModel upDM = new UpDownMethodModel(); UpDownGroup upDownGroup = dbDrive.GetDownGroup(udg_id); UpDownExperiment upDownExperiment = dbDrive.GetUpDownExperiment(upDownGroup.dudt_ExperimentId); List <UpDownGroup> upDownGroups = dbDrive.GetUpDownGroups(upDownExperiment.id); var lr = LiftingPublic.SelectState(upDownExperiment); upDM.id = udg_id; upDM.ExperimentalId = upDownGroup.dudt_ExperimentId; upDM.ExperimentalLabelName = lr.DistributionNameAndMethodStandardName(); upDM.ProductName = upDownExperiment.udt_ProdectName; upDM.Groupingstate = upDownExperiment.udt_Groupingstate == 0 ? "不分组" : "多组试验"; upDM.IsLastGroup = upDownGroups[0].Id == udg_id ? true : false; int count = 0; for (int i = 0; i < upDownGroups.Count; i++) { count++; if (upDownGroups[i].Id == udg_id) { break; } } upDM.GroupNumber = count; return(View(upDM)); }
private static QueryModel GetQueryModel(IDbDrive dbDrive, UpDownExperiment ude, LiftingAlgorithm lr) { QueryModel query = new QueryModel(); query.id = ude.id; query.InitialStimulus = ude.udt_Initialstimulus; query.StepLength = ude.udt_Stepd; query.Groping = ude.udt_Groupingstate; query.PublishStatusMethods = DistributionState(lr); query.pow = ude.udt_Power; List <UpDownGroup> upDownGroups = dbDrive.GetUpDownGroups(ude.id); query.udg_id = upDownGroups[0].Id; query.GroupNumber = upDownGroups.Count; List <UpDownView> upDownViews = dbDrive.GetUpDownViews_UDEID(ude.id); query.TotalNumberSaples = upDownViews.Count; query.FilpResponse = ude.udt_Flipresponse; query.DateTime = ude.udt_Creationtime.ToString(); query.projectname = ude.udt_ProdectName; return(query); }