Ejemplo n.º 1
0
        //导出excel
        public ActionResult GropingExcel(int udg_id, int ExperimentalId, int grop)
        {
            var strFullName = "";

            try
            {
                UpDownExperiment   upDownExperiment = dbDrive.GetUpDownExperiment(ExperimentalId);
                List <UpDownView>  upDownViews      = dbDrive.GetUpDownViews(udg_id);
                List <UpDownView>  upDownViews1     = dbDrive.GetUpDownViews_UDEID(ExperimentalId);
                List <UpDownGroup> list_udg         = dbDrive.GetUpDownGroups(ExperimentalId);
                var      lr     = LiftingPublic.SelectState(upDownExperiment);
                int[]    nj     = new int[list_udg.Count];
                double[] Gj     = new double[list_udg.Count];
                double[] Hj     = new double[list_udg.Count];
                double[] muj    = new double[list_udg.Count];
                double[] sigmaj = new double[list_udg.Count];
                for (int i = 0; i < list_udg.Count; i++)
                {
                    List <UpDownDataTable> upDownDataTables = dbDrive.GetUpDownDataTables(list_udg[i].Id);
                    var xAndV = LiftingPublic.GetXArrayAndVArray(upDownDataTables, upDownExperiment);
                    var up    = lr.GetReturn(xAndV.xArray, xAndV.vArray, upDownDataTables[0].dtup_Standardstimulus, list_udg[i].dudt_Stepd, out double z, upDownExperiment.udt_Instrumentresolution, out double z1);
                    nj[i]     = up.n;
                    Gj[i]     = up.G;
                    Hj[i]     = up.H;
                    muj[i]    = up.μ0_final;
                    sigmaj[i] = up.σ0_final;
                }
                strFullName = FreeSpire.UpDownFreeSpireExcel(upDownExperiment, upDownViews, grop, upDownViews1, nj, Gj, Hj, muj, sigmaj, lr, list_udg);
            }
            catch (Exception ex) { }
            return(Json(strFullName, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        //导出excel
        public JsonResult ExportXls(int langlryExpTableId)
        {
            var strFullName = "";

            try
            {
                LangleyExperimentTable  langlryExpTable = dbDrive.GetLangleyExperimentTable(langlryExpTableId);
                List <LangleyDataTable> ldts            = dbDrive.GetAllLangleyDataTable(langlryExpTable.let_Id);
                strFullName = FreeSpire.LangleyFreeSpireExcel(langlryExpTable, ldts);
            }
            catch (Exception ex) { }
            return(Json(strFullName, JsonRequestBehavior.AllowGet));
        }
        //导出excel
        public JsonResult ExportXls(int DoptimizeExpTableId)
        {
            var strFullName = "";

            try
            {
                DoptimizeExperimentTable  doptimizeExperimentTable = dbDrive.GetDoptimizeExperimentTable(DoptimizeExpTableId);
                List <DoptimizeDataTable> ddts = dbDrive.GetDoptimizeDataTables(doptimizeExperimentTable.det_Id);
                strFullName = FreeSpire.DoptimizeFreeSpireExcel(doptimizeExperimentTable, ddts);
            }
            catch (Exception ex) { }
            return(Json(strFullName, JsonRequestBehavior.AllowGet));
        }