コード例 #1
0
        public ActionResult Admin_delete(int id)
        {
            Admin admin = new Admin();

            admin.id = id;
            return(Json(dbDrive.Delete(admin)));
        }
コード例 #2
0
        public JsonResult RevocationData(int dop_id)
        {
            List <DoptimizeDataTable> ddt_list = dbDrive.GetDoptimizeDataTables(dop_id);
            var    isTurn               = dbDrive.Delete(ddt_list[ddt_list.Count - 1]);
            int    updateShowNumber     = ddt_list.Count - 2;
            double nextStimulusQuantity = ddt_list[ddt_list.Count - 2].ddt_StimulusQuantity;

            string[] valve = { isTurn.ToString(), updateShowNumber.ToString(), nextStimulusQuantity.ToString() };
            return(Json(valve));
        }
コード例 #3
0
        //撤销
        public ActionResult RevocationData(int id, int langlryExpTableId)
        {
            LangleyDataTable        langleyDataTable  = new LangleyDataTable();
            List <LangleyDataTable> langleyDataTables = dbDrive.GetAllLangleyDataTable(langlryExpTableId);

            langleyDataTable.ldt_Id = langleyDataTables[langleyDataTables.Count - 1].ldt_Id;
            bool isTure    = dbDrive.Delete(langleyDataTable);
            var  xOrVArray = LangleyPublic.XAndVArrays(langleyDataTables);

            string[] value = { isTure.ToString(), (xOrVArray.xArray.Length - 1).ToString(), xOrVArray.xArray[xOrVArray.xArray.Length - 2].ToString() };
            return(Json(value));
        }
コード例 #4
0
        public ActionResult RevocationData(int udg_id, int ExperimentalId)
        {
            List <UpDownDataTable> list_udt         = dbDrive.GetUpDownDataTables(udg_id);
            UpDownExperiment       upDownExperiment = dbDrive.GetUpDownExperiment(ExperimentalId);
            var lr    = LiftingPublic.SelectState(upDownExperiment);
            var xAndV = LiftingPublic.GetXArrayAndVArray(list_udt, upDownExperiment);

            if (list_udt.Count == 1)
            {
                string[] value = { "false", list_udt.Count.ToString(), list_udt[list_udt.Count - 1].dtup_Initialstimulus.ToString(), lr.StepsNumber(xAndV.xArray, xAndV.vArray).ToString() };
                return(Json(value));
            }

            UpDownDataTable        upDownDataTable = list_udt[list_udt.Count - 1];
            var                    isTure          = dbDrive.Delete(upDownDataTable);
            List <UpDownDataTable> list_udtDelete  = dbDrive.GetUpDownDataTables(udg_id);
            var                    xAndVDelete     = LiftingPublic.GetXArrayAndVArray(list_udtDelete, upDownExperiment);

            string[] valueDelete = { isTure.ToString(), (list_udt.Count - 1).ToString(), list_udtDelete[list_udtDelete.Count - 1].dtup_Initialstimulus.ToString(), lr.StepsNumber(xAndVDelete.xArray, xAndVDelete.vArray).ToString() };
            return(Json(valueDelete));
        }
コード例 #5
0
        public ActionResult Role_delete(int id)
        {
            List <Admin> admins = dbDrive.GetAllAdmins();

            foreach (Admin admin in admins)
            {
                int roleid = admin.role;
                if (roleid == id)
                {
                    return(Json(false));
                }
            }
            Role role = new Role();

            role.id = id;
            return(Json(dbDrive.Delete(role)));
        }
コード例 #6
0
        public ActionResult Langley_delete(int id)
        {
            var let = dbDrive.GetLangleyExperimentTable(id);

            return(Json(dbDrive.Delete(let)));
        }
コード例 #7
0
        public JsonResult Doptimize_delete(int dop_id)
        {
            var det = dbDrive.GetDoptimizeExperimentTable(dop_id);

            return(Json(dbDrive.Delete(det)));
        }