示例#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/GetHeBeiData?UserId=" + userId + "&ClassId=" + ClassId + "&SortId=" + SortId;
                    string       resut    = p.HttpGetFunction(path);
                    string       billpath = System.Web.Configuration.WebConfigurationManager.AppSettings["tikupath"] + "/GTX/GDTXHeBeiUserYSBQC/RedoAllQuestionsHB";
                    res = p.HttpPost(billpath, string.Format("jsonData={0}", resut));
                }
            }
            catch
            {
            }
            context.Response.Clear();
            context.Response.ContentType = "text/html";
            context.Response.Write(res);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                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.Redirect("Error/500.html");
                }
                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);
            }
            catch
            {
                Response.Redirect("Error/500.html");
            }
        }
示例#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
     {
     }
 }