Beispiel #1
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);
            }
        }
    }
Beispiel #2
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();
        }
    }
Beispiel #3
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();


            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 GroupId=1  ";
            mod.FieldList = "UserName,RegTime,islock";
            mod.TableName = "tb_User";
            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 UserName,RegTime,islock from tb_User where Classid=" + scholl_id + "  and GroupId=1 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();
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);


        if (!IsPostBack)
        {
            getztOperation();

            string userid = Session["userid"].ToString();
            //string sql = "select * from tb_U_Message where zxs_id=" + userid;

            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();
            //cid 1=消息 2=预约  3=辅导
            HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
            HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
            mod.Condition = "cid in(2,3) and zxs_id=" + userid;
            mod.FieldList = "uid,state,yy_time";
            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 uid,state,yy_time from tb_U_Message where cid in(2,3) and zxs_id=" + userid + " 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();
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["c"] != "" || Request.QueryString["c"] != null)
        {
            int id = int.Parse(Request.QueryString["c"].ToString());
            //string sql = "select id,Title,PostTime from tb_U_info where ClassId="+id;

            string sql2 = "select title from tb_U_schoolfl where Id=" + id;
            list_title = HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString();

            //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();
            mod.Condition = " Classid=" + id + " ";
            mod.FieldList = "Title,PostTime";
            mod.TableName = "tb_U_Info";
            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 id,Title from tb_U_Info where Classid=" + 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.PageView1();
            if (pg.RecordCount == 0)
            {
                this.Literal1.Text = "暂无数据!";
            }
            ds.Clear();
            ds.Dispose();
            ds1.Clear();
            ds1.Dispose();
        }
    }
Beispiel #6
0
    protected void bd()
    {
        string classid = LoginCheck.getadminid();
        string sqld    = "select id from tb_User where Classid=" + classid + " and GroupId=1";

        string sql = "select id from tb_U_user  where id in(" + sqld + ") ";

        //string sql2 = "select id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ")";
        //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql2);
        //Repeater1.DataBind();


        HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
        HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
        mod.Condition = "";
        mod.FieldList = "[User_id],Creation_time";
        mod.TableName = "tb_VortexDecompression";
        mod.Sort      = "Creation_time 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 id,Creation_time from tb_VortexDecompression order by Creation_time 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();
    }
Beispiel #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdManage(5);


        if (!IsPostBack)
        {
            //string sql = "select * from tb_U_Cplist where post_uid=" + Session["userid"] + " order by id desc";
            //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
            //Repeater1.DataBind();
            getztOperation();
            HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
            HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
            mod.Condition = "post_uid=" + Session["userid"];
            mod.FieldList = "title,cp_set,PostTime,cp_id,CreateUsers";
            mod.TableName = "tb_U_Cplist";
            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 title,cp_set,PostTime,cp_id,CreateUsers from tb_U_Cplist where  post_uid='" + Session["userid"].ToString() + "' order by 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();
        }
    }
    /// <summary>
    /// 栏目列表信息遍历
    /// </summary>
    /// <param name="ParentId"></param>
    /// <param name="Line"></param>
    protected void ListBind(int MenuId)
    {
        #region 2010-05-25 mjh
        string mmod  = "style=\"display:none;\"";
        string mdel  = "style=\"display:none;\"";
        string mshow = "style=\"display:none;\"";
        if (mM.Id != 0)
        {
            DataSet dst = bM.MenuReader(mM);
            if (dst.Tables[0].Rows.Count > 0)
            {
                string[] Arry2 = dst.Tables[0].Rows[0]["Sitting"].ToString().Split(',');
                for (int i = 0; i < Arry2.Length; i++)
                {
                    if (Arry2[i] == "2")
                    {
                        mmod = "";
                    }

                    if (Arry2[i] == "3")
                    {
                        mdel = "";
                    }
                    if (Arry2[i] == "5")
                    {
                        mshow = "";
                    }
                }
            }
        }
        #endregion
        mm.FieldList = GetField();
        mm.Condition = " ClassId=" + MenuId;
        mm.Sort      = "Sort DESC";
        mm.PageSize  = 20;
        mm.PageIndex = StringDeal.ToInt(Request.QueryString["Page"]);
        DataSet ds = bm.ModelList(mm);
        //----分页开始-----
        SgqPage pg = new SgqPage();
        pg.PageSize        = mm.PageSize;
        pg.PageIndex       = mm.PageIndex;
        pg.RecordCount     = (int)ds.Tables[1].Rows[0][0];//获取数据总数
        this.PageView.Text = pg.PageView2();
        //----分页结束-----
        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            InfoList += "<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">\n";
            InfoList += "<td align=\"center\"><input type=\"checkbox\" name=\"Id\" value=\"" + dr[0] + "\" /></td>\n";
            InfoList += "<td align=\"center\">" + dr[0] + "</td>\n";
            int x = 0;
            foreach (string j in GetField().Split(','))
            {
                int i = 0;
                if (x == 0)
                {
                    if (StringDeal.GetTrueOfStr(dr["IsTop"], "[置顶]") != string.Empty)
                    {
                        i++;
                    }
                    if (StringDeal.GetTrueOfStr(dr["IsElite"], "[推荐]") != string.Empty)
                    {
                        i++;
                    }
                    if (StringDeal.GetTrueOfStr(dr["IsHot"], "[热门]") != string.Empty)
                    {
                        i++;
                    }
                    i = i * 6;
                }
                InfoList += "<td><div class=\"editfieldbox\" title=\"" + StringDeal.StrFormat(dr[j]) + "\">" + HXD.Common.StringDeal.Substrings1(StringDeal.StrFormat(dr[j]).ToString(), 44 - i) + " ";
                if (x == 0)
                {
                    InfoList += "<span style=\"color:green;\">";
                    InfoList += StringDeal.GetTrueOfStr(dr["IsTop"], "[置顶]");
                    InfoList += StringDeal.GetTrueOfStr(dr["IsElite"], "[推荐]");
                    InfoList += StringDeal.GetTrueOfStr(dr["IsHot"], "[热门]");
                    InfoList += "</span>";
                }
                InfoList += "</div></td>\n";
                x++;
            }
            InfoList += "<td align=\"center\" nowrap=\"nowrap\"><input type=\"type\" onchange=\"IsNum(this.value," + dr[0] + ");\" class=\"input required\" size=\"3\" id=\"SortId_" + dr[0] + "\" name=\"SortId\" value=\"" + dr["Sort"] + "\" /><span id='s" + dr[0] + "'></span></td>\n";
            InfoList += "<td align=\"center\" nowrap=\"nowrap\">" + StringDeal.GetYesOrNo(dr["IsStatus"]) + "</td>\n";
            InfoList += "<td align=\"center\" nowrap=\"nowrap\">";
            InfoList += " <a href=\"Useradd.aspx?MenuId=" + dr[0] + "\">添加管理员</a> <a " + mshow + " href=\"Model_show.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">查看</a> <a " + mmod + " href=\"Model_Edit.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">修改</a> <a " + mdel + " onclick=\"return confirm('确认删除');\" href=\"?Action=del&MenuId=" + MenuId + "&Id=" + dr[0] + "\">删除</a>";
            InfoList += "</td>\n</tr>\n";
        }
    }
Beispiel #9
0
    /// <summary>
    /// 绑定量表
    /// </summary>
    /// <param name="id"></param>

/*    protected void lb(string userid)
 *  {
 *      string setting = LoginCheck.LbManage(int.Parse(Session["userid"].ToString()));
 *      //string sql1 = "select UserSetting from tb_User where id=" + userid;
 *      //string UserSetting = HXD.DBUtility.SQLHelper.ExecuteScalar(sql1).ToString();
 *      setting = setting.Substring(1);
 *      setting = setting.Substring(0, setting.Length - 1);
 *      setting = setting.Replace("m", "0");
 *      string sql = "select Fpaperid,Fpapername from t_exam_paper where [User_id] in (" + setting + ")";
 *      DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sql);
 *
 *  }*/
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sex = "", tj = "", stj = "", str_lb = "";

        if (this.option1.Checked == true)
        {
            tj += "and sex='男'";
        }
        if (this.option2.Checked == true)
        {
            tj += "and sex='女'";
        }
        string str_mz = this.se_mz.Value;//民族

        if (str_mz != "0")
        {
            tj += "and nationality='" + str_mz + "'";
        }
        string name = this.TextBox1.Text;//名字

        if (name != "")
        {
            tj += "and Name like '%" + name + "%'";
        }
        string a_time = ks_time.Value;//开始时间

        if (a_time != "")
        {
            str_lb += "and postTime>='" + a_time + "'";
        }
        string b_time = js_time.Value;//结束时间

        if (b_time != "")
        {
            str_lb += "and postTime<='" + b_time + "'";
        }

        string classid = LoginCheck.getadminid();
        string sqld    = "select id from tb_User where Classid=" + classid + " and GroupId=1";

        string sql = "select id from tb_U_user  where id in(" + sqld + ")  " + tj + "";

        //string sql2 = "select id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ")";
        //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql2);
        //Repeater1.DataBind();


        HXD.ModelField.BLL.Model   bll = new HXD.ModelField.BLL.Model();
        HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model();
        mod.Condition = "  Fresultid in(" + sql + ")  " + str_lb + "";
        mod.FieldList = "Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime";
        mod.TableName = "t_exam_results";
        mod.Sort      = "postTime 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 id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ") " + str_lb + " order by postTime 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();
    }