Beispiel #1
0
        //新增多组实验页面
        public ActionResult Manyexperiments(string ExperimentalId, string average, string standardDeviation)
        {
            int Experimentalid = Int32.Parse(ExperimentalId);
            ManyexperimentsModel manyexperimentsModel = new ManyexperimentsModel();
            List <UpDownGroup>   list_udg             = dbDrive.GetUpDownGroups(Experimentalid);
            UpDownExperiment     upDownExperiment     = dbDrive.GetUpDownExperiment(Experimentalid);

            manyexperimentsModel.previousSetNumber = list_udg[list_udg.Count - 1].dudt_Stepd;
            manyexperimentsModel.currentSetNumber  = list_udg.Count + 1;
            manyexperimentsModel.ProductName       = upDownExperiment.udt_ProdectName;
            manyexperimentsModel.stimulusQuantity  = average;
            manyexperimentsModel.stepLength        = standardDeviation;
            manyexperimentsModel.distribution      = LiftingPublic.SelectState(upDownExperiment).DistributionNameAndMethodStandardName();
            return(View(manyexperimentsModel));
        }
Beispiel #2
0
        public ActionResult ManyexperimentsSetings(int ExperimentalId)
        {
            var sr     = new StreamReader(Request.InputStream);
            var stream = sr.ReadToEnd();
            JavaScriptSerializer js              = new JavaScriptSerializer();
            ManyexperimentsModel mm              = js.Deserialize <ManyexperimentsModel>(stream);
            UpDownGroup          upDownGroup     = new UpDownGroup();
            UpDownDataTable      upDownDataTable = new UpDownDataTable();

            upDownGroup.dudt_ExperimentId = ExperimentalId;
            upDownGroup.dudt_Stepd        = double.Parse(mm.stepLength);
            dbDrive.Insert(upDownGroup);
            upDownDataTable.dtup_DataTableId      = upDownGroup.Id;
            upDownDataTable.dtup_Initialstimulus  = double.Parse(mm.stimulusQuantity);
            upDownDataTable.dtup_Standardstimulus = LiftingPublic.SelectState(dbDrive.GetUpDownExperiment(ExperimentalId)).GetStandardStimulus(upDownDataTable.dtup_Initialstimulus);
            upDownDataTable.dtup_response         = 0;
            bool isTure = dbDrive.Insert(upDownDataTable);

            string[] value = { isTure.ToString(), upDownGroup.Id.ToString() };
            return(Json(value));
        }