Exemplo n.º 1
0
        public string DelTestInfo(string id)
        {
            TestInfoHanding tif  = new TestInfoHanding();
            string          json = tif.DeleteTestInfoAddAllTest(id);

            return("{\"back\":\"" + json + "\"}");
        }
Exemplo n.º 2
0
        public ActionResult TestManage(string id, string dataId)
        {
            ViewBag.topCompanyId = id;
            ViewBag.id           = dataId;
            ViewBag.a            = dataId.Split('#')[1] + "a";
            ViewBag.tableId1     = dataId.Split('#')[1] + "table1";
            ViewBag.tableId2     = dataId.Split('#')[1] + "table2";
            ViewBag.tableId3     = dataId.Split('#')[1] + "table3";
            ViewBag.win01        = dataId.Split('#')[1] + "win01";
            ViewBag.win02        = dataId.Split('#')[1] + "win02";
            ViewBag.input01      = dataId.Split('#')[1] + "input01";
            ViewBag.input02      = dataId.Split('#')[1] + "input02";
            ViewBag.input03      = dataId.Split('#')[1] + "input03";
            ViewBag.input04      = dataId.Split('#')[1] + "input04";
            ViewBag.sub01        = dataId.Split('#')[1] + "sub01";
            ViewBag.sub02        = dataId.Split('#')[1] + "sub02";
            ViewBag.iframe       = dataId.Split('#')[1] + "iframe";
            ViewBag.select       = dataId.Split('#')[1] + "select";
            TestInfoHanding tif = new TestInfoHanding();

            ViewBag.hastest = 0;
            //如果存在id公司的问卷
            List <@class> qclasses = new _Class().GetQuestionClass(1, 1000000);
            string        s        = "<select style=\"float:left;margin-left:10px;margin-top:6px;\" id=" + ViewBag.select + " class=\"companyclass\" name=\"cars\">";

            foreach (@class c in qclasses)
            {
                s += "<option class=\"notstart\" value=\"" + c.class_Class + "\">" + c.class_Class + "</option> ";
            }
            s += "</select>";
            ViewBag.options = s;
            if (tif.HasTestInfo(id))
            {
                ViewBag.hastest = 1;
                TestHanding th = new TestHanding();
                testInfo    t  = tif.GetTestInfo(id);
                ViewBag.testInfoId = t.testInfo_Id;
                ViewBag.title      = t.testInfo_Name;
                ViewBag.comId      = t.testInfo_OwnComPanyId;
                ViewBag.totalNum   = th.GetTestCount(t.testInfo_Id);
                ViewBag.qclass     = th.GetTestClassCount(t.testInfo_Id);
                ViewBag.creatTime  = t.testInfo_GenerateTime;
                ViewBag.startTime  = t.testInfo_StartTime;
                ViewBag.deadline   = t.testInfo_Deadline;
            }
            //不存在id公司的问卷
            else
            {
                ViewBag.title     = "未创建";
                ViewBag.comId     = "未创建";
                ViewBag.totalNum  = "未创建";
                ViewBag.qclass    = "未创建";
                ViewBag.creatTime = "未创建";
                ViewBag.startTime = "未创建";
                ViewBag.deadline  = "未创建";
            }
            return(PartialView());
        }
Exemplo n.º 3
0
        public string AddTestInfo(string id)
        {
            string          testName  = Request["parameter0"];
            string          startTime = Request["parameter1"];
            string          deadline  = Request["parameter2"];
            TestInfoHanding tif       = new TestInfoHanding();
            string          json      = tif.CreateTestInfo(id, testName, startTime, deadline);

            return("{\"back\":\"" + json + "\"}");
        }