コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        if (!IsPostBack)
        {
            string sname  = Session["AdminManage"].ToString();
            string MenuId = Session["userid"].ToString();
            userid = int.Parse(MenuId);
            string sql_mid   = "select Classid from tb_User where id=" + userid;
            int    scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString());

            string sql_school = "select s_name from tb_U_school where ID=" + scholl_id;
            sc_name = HXD.DBUtility.SQLHelper.ExecuteScalar(sql_school).ToString();
            string user_name = "select Name from tb_U_User where ID=" + MenuId;
            u_name = HXD.DBUtility.SQLHelper.ExecuteScalar(user_name).ToString();

            //string sql = "select * from tb_User where ID=" + MenuId;
            //DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);

            //icd = ds.Tables[0].Rows[0]["id"].ToString();
            string cscun = "select COUNT(id) from t_exam_results where FstudentNo='" + sname + "'";

            cs_cun = HXD.DBUtility.SQLHelper.ExecuteScalar(cscun).ToString();
            //cid 1=测评  2=预约  3=辅导 4=消息
            string yycun = "select COUNT(id) from tb_U_Message where uid='" + MenuId + "' and cid=2";
            yy_cun = HXD.DBUtility.SQLHelper.ExecuteScalar(yycun).ToString();


            string tzcun = "select COUNT(id) from tb_U_Message where uid='" + MenuId + "' and cid=4";
            tz_cun = HXD.DBUtility.SQLHelper.ExecuteScalar(tzcun).ToString();
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();

        getztOperation();
        if (!IsPostBack)
        {
            string MenuId    = Session["userid"].ToString();
            string sql_group = "select GroupId from tb_User where id=" + MenuId;
            int    groupid   = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_group).ToString());

            if (groupid == 7)
            {
                //string sql_mid = "select Classid from tb_User where id=" + MenuId;
                //int scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString());
                string sql = "select * from tb_U_school order by id";

                Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
                Repeater1.DataBind();
            }
            else
            {
                StringDeal.Alter("您没有这个权限!");
            }
        }
    }
コード例 #3
0
ファイル: fd_xq.aspx.cs プロジェクト: soldiers1989/1.Website
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);
        if (!IsPostBack)
        {
            this.Panel1.Visible = true;
            string  cid      = Request.QueryString["cid"].ToString();
            string  sql      = "select uid,content,Replay,yy_time,state from tb_U_Message where id=" + cid;
            DataSet ds       = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            string  str      = ds.Tables[0].Rows[0]["content"].ToString();
            string  strid    = ds.Tables[0].Rows[0]["uid"].ToString();
            string  sql1     = "select name from tb_U_user where id=" + strid;
            string  str_name = HXD.DBUtility.SQLHelper.ExecuteScalar(sql1).ToString();
            this.Label1.Text     = str_name;
            this.Label2.Text     = str;
            this.Label3.Text     = ds.Tables[0].Rows[0]["yy_time"].ToString();
            this.container.Value = ds.Tables[0].Rows[0]["Replay"].ToString();

            int icd = int.Parse(ds.Tables[0].Rows[0]["state"].ToString());
            if (icd == 2)
            {
                this.Panel1.Visible = false;
            }
        }
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);

        if (!IsPostBack)
        {
            this.Panel1.Visible = true;
            this.Select1.Items.Add(new ListItem("顶级栏目", "0"));
            menid = LoginCheck.getadminid();
            bd(menid);
            if (Request.QueryString["id"] != null)
            {
                this.Panel1.Visible = false;
                this.Panel2.Visible = true;
                string  id  = Request.QueryString["id"].ToString();
                string  sql = "select id,ClassId,title,depth from tb_U_schoolfl where id='" + id + "'";
                DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TextBox1.Text = ds.Tables[0].Rows[0]["title"].ToString();
                    Select1.Value = ds.Tables[0].Rows[0]["ClassId"].ToString();
                }
            }
        }
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);
        this.Select1.Items.Add(new ListItem("顶级栏目", "0"));
        string sql = "select classid from tb_user where ID=" + Session["userid"].ToString();

        menid = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();
        bd(menid);
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null)
            {
                this.Panel2.Visible = true;
                string  id    = Request.QueryString["id"].ToString();
                string  sqlmb = "select title,ClassId,Sid,Depth,mb_id from tb_U_schoolfl where id=" + id;
                DataSet ds    = HXD.DBUtility.SQLHelper.ExecuteDataset(sqlmb);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.TextBox1.Text = ds.Tables[0].Rows[0]["title"].ToString();
                    this.Select1.Value = ds.Tables[0].Rows[0]["ClassId"].ToString();
                    this.Select2.Value = ds.Tables[0].Rows[0]["mb_id"].ToString();
                }
            }
            else
            {
                this.Panel1.Visible = true;
            }
        }
    }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] != null)
            {
                string id  = Request.QueryString["id"].ToString();
                string sql = "select Id,uid,Name,Content,yy_time,zxs_id,replay,PostTime from tb_U_Message where Id='" + id + "'";
                //string sql = "select id,ClassId,Title,content,PostTime from tb_U_info where Id=" + id;
                DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    xs_name = getname(ds.Tables[0].Rows[0]["uid"].ToString());
                    xs_note = ds.Tables[0].Rows[0]["Content"].ToString();
                    xs_time = ds.Tables[0].Rows[0]["yy_time"].ToString();

                    ls_name = getname(ds.Tables[0].Rows[0]["zxs_id"].ToString());
                    ls_note = ds.Tables[0].Rows[0]["replay"].ToString();
                    ls_time = ds.Tables[0].Rows[0]["PostTime"].ToString();
                    if (ls_note == null || ls_note == "")
                    {
                        ls_note = "暂无回复!请稍后。";
                        ls_time = "";
                    }
                }
            }
        }
    }
コード例 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);
        if (!IsPostBack)
        {
            string sqlc = "select Classid from tb_User where Id=" + Session["userid"].ToString();
            string scid = HXD.DBUtility.SQLHelper.ExecuteScalar(sqlc).ToString();

            if (Request.QueryString["wzid"] != null)
            {
                string  wzid = Request.QueryString["wzid"].ToString();
                string  sql  = "select * from tb_U_info where id=" + wzid;
                DataSet ds   = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.TextBox1.Text   = ds.Tables[0].Rows[0]["title"].ToString();
                    this.TextBox2.Text   = ds.Tables[0].Rows[0]["note"].ToString();
                    this.container.Value = ds.Tables[0].Rows[0]["Content"].ToString();
                }

                this.Panel1.Visible = false;
                this.Panel2.Visible = true;
            }
            else
            {
                this.Panel1.Visible = true;
                this.Panel2.Visible = false;
            }
        }
    }
コード例 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();

        if (!IsPostBack)
        {
            stre();
        }
    }
コード例 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         LoginCheck.AdManage(5);
         string classid = LoginCheck.getadminid();
         bd(classid);
     }
 }
コード例 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdManage(7);
     if (!IsPostBack)
     {
         this.Select1.Items.Add(new ListItem("顶级栏目", "0"));
         menid = Session["userid"].ToString();
         bd(menid);
     }
 }
コード例 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);

        this.Select1.Items.Add(new ListItem("顶级栏目", "0"));
        string sql = "select classid from tb_user where ID=" + Session["userid"].ToString();

        menid = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();
        bd(menid);
    }
コード例 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);
        if (!IsPostBack)
        {
            string userid = Session["userid"].ToString();

            this.TextBox1.Text = Session["AdminManage"].ToString();
        }
    }
コード例 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        getztOperation();
        if (!IsPostBack)
        {
            string MenuId    = Session["userid"].ToString();
            string sql_mid   = "select Classid from tb_User where id=" + MenuId;
            int    scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString());

            //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id";

            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();
            //cid 1=测评  2=预约  3=辅导 4=消息
            HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
            HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
            mod.Condition = " Classid=" + scholl_id + " and cid=4 and zxs_id=" + MenuId + "";
            mod.FieldList = "Content,ClassId,PostTime,IsStatus";
            mod.TableName = "tb_U_Message";
            mod.Sort      = "Sort desc";
            mod.PageSize  = 20;
            mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]);
            DataSet ds1 = bll.ModelList(mod);
            DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 Content,ClassId,PostTime,IsStatus from tb_U_Message where Classid=" + scholl_id + "  order by Sort desc,id desc;");
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();

            HXD.Common.SgqPage pg = new HXD.Common.SgqPage();
            pg.PageSize        = mod.PageSize;
            pg.PageIndex       = mod.PageIndex;
            pg.RecordCount     = (int)ds1.Tables[1].Rows[0][0];
            this.Literal1.Text = pg.PageView2();
            if (pg.RecordCount == 0)
            {
                this.Literal1.Text = "暂无数据!";
            }
            ds.Clear();
            ds.Dispose();
            ds1.Clear();
            ds1.Dispose();

            //审核
            int    icd    = StringDeal.ToInt(Request.QueryString["Id"]);
            string Action = Request.QueryString["Action"];
            if (Action == "lock")
            {
                string sql2 = "SELECT IsStatus from tb_U_Message where id='" + icd + "'";
                bool   stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString());

                string sql = "UPDATE tb_U_Message set IsStatus=1 where id='" + icd + "'";
                HXD.DBUtility.SQLHelper.ExecuteScalar(sql);
            }
        }
    }
コード例 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        if (Request.QueryString["para"] != null)//Request.QueryString["MenuId"]
        {
            string str = Request.QueryString["para"].ToString();
            string iid = Request.QueryString["iid"].ToString();

            Response.Write(stra(str, iid));
        }
    }
コード例 #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdManage(6);
     if (!IsPostBack)
     {
         string userid = Session["userid"].ToString();
         this.TextBox1.Text = Session["AdminManage"].ToString();
         string sql = "select name from tb_u_user where id='" + userid + "'";
         this.cname.Text = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();
     }
 }
コード例 #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(1);
        if (!IsPostBack)
        {
            //string sql = "select classid from tb_user where ID=" + Session["userid"].ToString();
            //string xz_id = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();


            //bdinfo();
        }
    }
コード例 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdManage();
     if (!IsPostBack)
     {
         string MenuId = Session["userid"].ToString();
         int    userid = int.Parse(MenuId);
         string sql    = "select id,uid,zxs_id,Content,PostTime,state from tb_U_Message where cid=1 and uid=" + userid + " order by id desc";
         Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
         Repeater1.DataBind();
     }
 }
コード例 #18
0
ファイル: new_fl.aspx.cs プロジェクト: soldiers1989/1.Website
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdManage(7);
     if (!IsPostBack)
     {
         string menid = Session["userid"].ToString();
         //string sql = "select * from tb_U_schoolfl where sid=" + menid;
         //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
         //Repeater1.DataBind();
         bdlist(menid);
     }
 }
コード例 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);
        if (!IsPostBack)
        {
            /*          string sql = "select classid from tb_user where id=" + Session["userid"].ToString();
             *        string classid = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();*/
            bd();
/*            lb(Session["userid"].ToString());*/
            /*       getztOperation();*/
        }
    }
コード例 #20
0
ファイル: cp.aspx.cs プロジェクト: soldiers1989/1.Website
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();


        string cp_title             = "select * from t_exam_paper where Fpaperid=1";                              //测评标题
        string cp_questions         = "select * from t_exam_questions where Fexampaperid=1";                      //测评问题
        string cp_questions_score   = "select * from t_exam_score_ref where Fexampaperid=1 order by Fquestionid"; //测评答案分数
        string cp_questions_options = "select * from t_exam_options where Foptionid=9";                           //测评答案选项

        cp_questioncun = HXD.DBUtility.SQLHelper.ExecuteScalar("select COUNT(Fexampaperid) from t_exam_questions where Fexampaperid=1").ToString();
        DataSet cp = HXD.DBUtility.SQLHelper.ExecuteDataset(cp_title);

        if (cp.Tables[0].Rows.Count > 0)
        {
            cp_name = cp.Tables[0].Rows[0]["Fpapername"].ToString();   //测评题目
            cp_note = cp.Tables[0].Rows[0]["Fdescription"].ToString(); //测评简介
            cp_id   = cp.Tables[0].Rows[0]["Fpaperid"].ToString();     //测评简介
        }


        DataSet ques = HXD.DBUtility.SQLHelper.ExecuteDataset(cp_questions);

        for (int i = 0; i < ques.Tables[0].Rows.Count; i++)
        {
            int      b          = i + 1;
            string   ques_title = ques.Tables[0].Rows[i]["Fquestion"].ToString();
            string   sql22      = "select Fscoreref from t_exam_score_ref where Fexampaperid=1 and Fquestionid=" + b;
            string   core       = HXD.DBUtility.SQLHelper.ExecuteScalar(sql22).ToString();
            string[] sArray     = core.Split('|');
            string   option1    = sArray[0];
            string   option2    = sArray[1];
            string   option3    = sArray[2];
            string   option4    = sArray[3];
            string   option5    = sArray[4];

            questions += "<div id=\"panel2\" class=\"panel-body js_answer\" style=\"display: none;\">";
            questions += "<form action=\"#\" method=\"POST\"><a name=\"result\" href=\"javascript:void(0)\"></a>";
            questions += "<div class=\"form-group avatar text-center\"><label for=\"\" class=\"sr-only\">前言</label>";
            questions += "<a href=\"javascript:void(0)\" class=\"img-circle\" name=\"1\"><span style=\"float: left;text-align: center; width: 100%; padding-top: 18px;\"><img src=\"ks.jpg\"></span> </a></div>";
            questions += "<dl><dd>" + b + "." + ques_title + "</dd></dl>";
            questions += "<ul class=\"list-group  js_group\">";
            DataSet option = HXD.DBUtility.SQLHelper.ExecuteDataset(cp_questions_options);
            for (int ii = 0; ii < option.Tables[0].Rows.Count; ii++)
            {
                string options = option.Tables[0].Rows[ii]["Foptionitemvalue"].ToString();
                questions += "<li class=\"list-group-item\" onclick=\"return toggle(this);\">";
                questions += "<input name=\"g\" type=\"radio\" class=\"\" value=\"" + sArray[ii] + "\" />" + options + "</li>";
            }
            questions += "</ul></form></div>";
        }
    }
コード例 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(7);

        getztOperation();
        if (!IsPostBack)
        {
            string sql = "SELECT * from tb_User where  GroupId=6 order by id";

            Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            Repeater1.DataBind();
        }
    }
コード例 #22
0
ファイル: Charts.aspx.cs プロジェクト: soldiers1989/1.Website
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);
        if (!IsPostBack)
        {
            string sql     = "select classid from tb_user where id=" + Session["userid"].ToString();
            string classid = HXD.DBUtility.SQLHelper.ExecuteScalar(sql).ToString();
            bd(classid);

            bd();
            lb(Session["userid"].ToString());
        }
    }
コード例 #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(6);
        if (!IsPostBack)
        {
            string userid = Session["userid"].ToString();
            string sqlcl  = "select name,tel from tb_u_user where id=" + userid;

            DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sqlcl);
            this.TextBox1.Text = ds.Tables[0].Rows[0]["name"].ToString();
            this.TextBox2.Text = ds.Tables[0].Rows[0]["tel"].ToString();
        }
    }
コード例 #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);


        if (!IsPostBack)
        {
            //string sql = "select * from t_exam_paper where Fpapertype=1";
            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();
            lb(Session["userid"].ToString());
        }
    }
コード例 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        getztOperation();
        if (!IsPostBack)
        {
            // string sqlc = "select id,FstudentNo,Fscore,posttime from t_exam_results where [Fresultid] in(select distinct Fresultid  from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] >='" + Fscore + "' and [wid] ='" + wid + "')";

            string Fsubitemid = Request.QueryString["Fsubitemid"].ToString().Trim();
            string Fscore     = Request.QueryString["Fscore"].ToString().Trim();
            string wid        = Request.QueryString["wid"].ToString().Trim();

            //string MenuId = Session["userid"].ToString();
            //string sql_mid = "select Classid from tb_User where id=" + MenuId;
            int scholl_id = int.Parse(LoginCheck.getadminid());

            //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id";

            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();


            HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
            HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
            //select * from t_exam_results where Fpaperid=1 and Fscore>160 and wid=
            mod.Condition = " Fpaperid='" + Fsubitemid + "' and Fscore >='" + Fscore + "' and wid ='" + wid + "'";
            mod.FieldList = "FstudentNo,Fscore,posttime";
            mod.TableName = "t_exam_results";
            mod.Sort      = "Sort desc";
            mod.PageSize  = 20;
            mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]);
            DataSet ds1 = bll.ModelList(mod);
            DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset("select id,FstudentNo,Fscore,posttime from t_exam_results where  Fpaperid='" + Fsubitemid + "' and Fscore >='" + Fscore + "' and wid ='" + wid + "' order by Sort desc;");
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();

            HXD.Common.SgqPage pg = new HXD.Common.SgqPage();
            pg.PageSize        = mod.PageSize;
            pg.PageIndex       = mod.PageIndex;
            pg.RecordCount     = (int)ds1.Tables[1].Rows[0][0];
            this.Literal1.Text = pg.PageView2();
            if (pg.RecordCount == 0)
            {
                this.Literal1.Text = "暂无数据!";
            }
            ds.Clear();
            ds.Dispose();
            ds1.Clear();
            ds1.Dispose();
        }
    }
コード例 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(7);

        getztOperation();
        if (!IsPostBack)
        {
            string userid = Session["userid"].ToString();
            string sql    = "select * from tb_U_info where userid=" + userid;

            Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            Repeater1.DataBind();
        }
    }
コード例 #27
0
ファイル: Scorer.aspx.cs プロジェクト: soldiers1989/1.Website
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage();
        if (Request.QueryString["answers"] != null)                                 //Request.QueryString["MenuId"]
        {
            string sc_id = LoginCheck.getadminid();                                 //学校ID

            string answers = Request.QueryString["answers"].ToString();             //答案
            string wid     = Request.QueryString["wid"].ToString();                 //答案
            answers = answers.Remove(0, 2);
            int    paperID2 = int.Parse(Request.QueryString["paperid"].ToString()); //量表名称
            string UserName = Session["AdminManage"].ToString();                    //"maidi007";用户名
            string Userid   = Session["userid"].ToString();
            //string answers = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|2|2|2|2|2|2|2";//scl-90
            //string answers = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0";
            //int paperID2 = 2;
            Scorer scorer = Scorer.CreateScorer(paperID2);
            string resultText;
            float  totalScore;
            int[]  scoreArray;
            scorer.Score(paperID2, answers, out resultText, out totalScore, out scoreArray);
            int[]   subitemIds        = null;
            float[] subitemScoreArray = null;
            bool    seniorScoreResult = scorer.SeniorScore(paperID2, answers, scoreArray, UserName, ref resultText, out subitemIds, out subitemScoreArray);
            scorer.Diagnose(paperID2, answers, UserName, scoreArray, totalScore, subitemScoreArray, ref resultText);

            int resultid = int.Parse(Session["userid"].ToString());
            //string wid = DateTime.Now.ToString("yyyyMMddHHmmssfff");
            SaveResult(resultid, UserName, paperID2, answers, scoreArray, totalScore, resultText, GetTestNum(paperID2), wid, sc_id);
            if (seniorScoreResult)
            {
                SaveSubItemResult(UserName, resultid, subitemIds, subitemScoreArray, wid, sc_id);
            }
            if (IsPCPaper(paperID2))
            {
                string sql = "update tb_U_Message set state=2 where rid='" + wid + "' and uid='" + Userid + "'";
                HXD.DBUtility.SQLHelper.ExecuteNonQuery(sql);
                Response.Write("结果已提交到服务器,谢谢你完成此调查所有问题。");
                //base.get_Response().Write("结果已提交到服务器,谢谢你完成此调查所有问题。");
            }
            else
            {
                string sql = "update tb_U_Message set state=2 where rid='" + wid + "' and uid='" + Userid + "'";
                HXD.DBUtility.SQLHelper.ExecuteNonQuery(sql);


                //Response.Write(resultText);
            }
        }
    }
コード例 #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdManage(6);
     if (!IsPostBack)
     {
         string userid = Session["userid"].ToString();
         string sqlcl  = "select Classid from tb_user where id=" + userid;
         string id     = HXD.DBUtility.SQLHelper.ExecuteScalar(sqlcl).ToString();
         // LoginCheck.Sendmsg(id, "【教育局】" + s_name2 + "查看了学校的量表统计!");
         string  sql = "select * from tb_U_school where id=" + id;
         DataSet ds  = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
         this.TextBox1.Text = ds.Tables[0].Rows[0]["s_name"].ToString();
         this.TextBox2.Text = ds.Tables[0].Rows[0]["note"].ToString();
     }
 }
コード例 #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(1);
        string uid     = Session["userid"].ToString();
        string setting = LoginCheck.LbManage(int.Parse(uid));

        wid     = Request.QueryString["wid"].ToString();
        setting = setting.Substring(1);
        setting = setting.Substring(0, setting.Length - 1);
        setting = setting.Replace("m", "0");
        string sql = "select * from t_exam_paper where Fpapertype=1 and Fpaperid in(" + setting + ")";

        Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
        Repeater1.DataBind();
    }
コード例 #30
0
ファイル: from_g.aspx.cs プロジェクト: soldiers1989/1.Website
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(1);
        if (!IsPostBack)
        {
            bd();
            //string MenuId = Session["userid"].ToString();
            //userid = int.Parse(MenuId);

            //string sql = "select * from tb_U_User where id=" + userid;
            //DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //this.username.Text = ds.Tables[0].Rows[0]["name"].ToString();
            //this.userphone.Text = ds.Tables[0].Rows[0]["tel"].ToString();
        }
    }