Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            string method  = context.Request.QueryString["Method"].ToString();
            string ClassId = context.Request.QueryString["ClassId"].ToString();
            string userId  = context.Request.QueryString["userId"].ToString();
            string SortId  = context.Request.QueryString["SortId"].ToString();
            string res     = "";

            try
            {
                if (method == "Clear")
                {
                    //国地税题目
                    publicmethod p        = new publicmethod();
                    string       path     = System.Web.Configuration.WebConfigurationManager.AppSettings["Practicepath"] + "/APIPractice/Chongzuo.asmx/GetGuiZhouData?UserId=" + userId + "&ClassId=" + ClassId + "&SortId=" + SortId + "&courseId=" + ConfigurationManager.AppSettings["CourseId"];
                    string       resut    = p.HttpGetFunction(path);
                    string       billpath = System.Web.Configuration.WebConfigurationManager.AppSettings["tikupath"] + "/GTX/GDTXGuiZhouUserYSBQC/RedoAllQuestionsGuiZhou";
                    res = p.HttpPost(billpath, string.Format("jsonData={0}", resut));
                }
            }
            catch (Exception ex)
            {
            }
            context.Response.Clear();
            context.Response.ContentType = "text/html";
            context.Response.Write(res);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string    userid   = Request.QueryString["userid"].ToString();
            string    username = Request.QueryString["username"].ToString();
            string    classid  = Request.QueryString["classid"].ToString();
            string    courseid = Request.QueryString["courseid"].ToString();
            string    sortid   = Request.QueryString["sortid"].ToString();
            APIResult obj      = new APIResult();

            if (string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(username) || string.IsNullOrEmpty(classid) || string.IsNullOrEmpty(courseid) || string.IsNullOrEmpty(sortid))
            {
                Response.Write("参数为空");
            }
            else
            {
                Check c   = new Check();
                bool  res = c.ProcessRequest("get", userid, "", "");
                if (res == false)
                {
                    Response.Redirect("Error/500.html");
                }
            }

            publicmethod p = new publicmethod();

            questionstr = p.HttpGetFunction(System.Web.Configuration.WebConfigurationManager.AppSettings["tikupath"] + "/GTX/GTXUserQuestion/GetQID?classid=" + classid + "&userid=" + userid + "&sortid=" + sortid);
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         publicmethod p     = new publicmethod();
         string       path  = System.Web.Configuration.WebConfigurationManager.AppSettings["Practicepath"] + "/APIPractice/VideoManage.asmx/GetByCourseId?CourseId=" + System.Web.Configuration.WebConfigurationManager.AppSettings["CourseId"];
         string       resut = p.HttpGetFunction(path);
         ActionResult ar    = JsonConvert.DeserializeObject <ActionResult>(resut);
         Session["VideoManage"] = ar.Data;
     }
     catch
     {
     }
 }