protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Session["classid"] = 39;
        sqlHelp   sqlhelper = new sqlHelp();
        string    classid   = Session["classid"].ToString();
        string    selectsql = "select * from classInfo where id='" + classid + "'";
        DataTable db        = sqlhelper.dataTableReturn(selectsql);
        string    oldName   = db.Rows[0]["className"].ToString();

        string classNewName   = TextBox1.Text.ToString();
        string collegeNewName = DropDownList1.Text;
        string updatesql1     = "update classInfo set className='" + classNewName + "'where id='" + classid + "'";

        sqlhelper.SqlServerExcute(updatesql1);
        string updatesql11 = "update classInfo set collegeName='" + collegeNewName + "'where id='" + classid + "'";

        sqlhelper.SqlServerExcute(updatesql11);
        string updatesql2 = "update studentInfo set stuClass='" + classNewName + "'where stuClass='" + oldName + "'";

        sqlhelper.SqlServerExcute(updatesql2);
        string updatesql22 = "update studentInfo set stuCollege='" + collegeNewName + "'where stuClass='" + classNewName + "'";

        sqlhelper.SqlServerExcute(updatesql22);
        Response.Write("<Script>alert('信息修改成功!');</script>");
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            sqlHelp   sqlhelper = new sqlHelp();
            string    teaid     = Session["teaidedit"].ToString();
            string    selectsql = "select * from teacherInfo where id='" + teaid + "'";
            DataTable db        = sqlhelper.dataTableReturn(selectsql);
            TextBox1.Text = db.Rows[0]["teaNum"].ToString();
            TextBox2.Text = db.Rows[0]["teaName"].ToString();
            TextBox3.Text = db.Rows[0]["teaSex"].ToString();
            TextBox4.Text = db.Rows[0]["teaID"].ToString();
            TextBox5.Text = db.Rows[0]["teaNational"].ToString();
            TextBox6.Text = db.Rows[0]["teaTel"].ToString();
            TextBox7.Text = db.Rows[0]["teaChangerequest"].ToString();

            string    selectdepartment = "select * from departmentInfo";
            DataTable db2 = sqlhelper.dataTableReturn(selectdepartment);
            DropDownList1.DataSource     = db2;
            DropDownList1.DataTextField  = "departmentName";
            DropDownList1.DataValueField = "departmentName";
            DropDownList1.DataBind();
            DropDownList1.Text = db.Rows[0]["teaDepartment"].ToString();
        }
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string  collegeid = Convert.ToString(e.CommandArgument);
        sqlHelp sqlhelper = new sqlHelp();

        if (e.CommandName == "del")
        {
            string    selectcollegename = "select * from collegeInfo where id='" + collegeid + "'";
            DataTable db1         = sqlhelper.dataTableReturn(selectcollegename);
            string    collegename = db1.Rows[0]["collegeName"].ToString();
            string    delclass    = "delete from classInfo where collegeName='" + collegename + "'";
            sqlhelper.SqlServerExcute(delclass);
            string delstu = "delete from studentInfo where stuCollege='" + collegename + "'";
            sqlhelper.SqlServerExcute(delstu);

            string deletesql = "delete from collegeInfo where id='" + collegeid + "'";
            sqlhelper.SqlServerExcute(deletesql);
            Response.Write("<script>alert('学院删除成功!请刷新查看');</script>");
        }
        else if (e.CommandName == "edit")
        {
            Session["collegeid"] = collegeid;
            Response.Redirect("Modifycollege.aspx");
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlHelp   sqlhelper = new sqlHelp();
         string    stuid     = Session["stuid"].ToString();
         string    selectsql = "select * from studentInfo where id='" + stuid + "'";
         DataTable dt        = sqlhelper.dataTableReturn(selectsql);
         Label1.Text = dt.Rows[0]["stuNum"].ToString();
         Label2.Text = dt.Rows[0]["stuName"].ToString();
         Label3.Text = dt.Rows[0]["stuSex"].ToString();
         Label4.Text = dt.Rows[0]["stuID"].ToString();
         Label5.Text = dt.Rows[0]["stuNational"].ToString();
         Label6.Text = dt.Rows[0]["stuTel"].ToString();
         Label7.Text = dt.Rows[0]["stuCollege"].ToString();
         Label8.Text = dt.Rows[0]["stuClass"].ToString();
         if (dt.Rows[0]["stuChangerequest"].ToString() == "")
         {
             Label9.Text = "该用户未提交变更请求";
         }
         else
         {
             Label9.Text = dt.Rows[0]["stuChangerequest"].ToString();
         }
         Image1.ImageUrl = "~/" + dt.Rows[0]["stuPic"].ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string id = Request.QueryString["id"];
         //string id = "72";
         if (id != "")
         {
             sqlHelp   sqlhelper = new sqlHelp();
             string    selectsql = "select * from studentInfo where id='" + id + "'";
             DataTable dt        = sqlhelper.dataTableReturn(selectsql);
             Label1.Text = dt.Rows[0]["stuNum"].ToString();
             Label2.Text = dt.Rows[0]["stuName"].ToString();
             Label3.Text = dt.Rows[0]["stuSex"].ToString();
             Label4.Text = dt.Rows[0]["stuID"].ToString();
             Label5.Text = dt.Rows[0]["stuNational"].ToString();
             Label6.Text = dt.Rows[0]["stuTel"].ToString();
             Label7.Text = dt.Rows[0]["stuCollege"].ToString();
             Label8.Text = dt.Rows[0]["stuClass"].ToString();
             if (dt.Rows[0]["stuChangerequest"].ToString() != null)
             {
                 TextBox1.Text = dt.Rows[0]["stuChangerequest"].ToString();
             }
         }
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            sqlHelp   sqlhelper = new sqlHelp();
            string    stuid     = Session["stuidedit"].ToString();
            string    selectsql = "select * from studentInfo where id='" + stuid + "'";
            DataTable db        = sqlhelper.dataTableReturn(selectsql);
            TextBox1.Text = db.Rows[0]["stuNum"].ToString();
            TextBox2.Text = db.Rows[0]["stuName"].ToString();
            TextBox3.Text = db.Rows[0]["stuSex"].ToString();
            TextBox4.Text = db.Rows[0]["stuID"].ToString();
            TextBox5.Text = db.Rows[0]["stuNational"].ToString();
            TextBox6.Text = db.Rows[0]["stuTel"].ToString();
            TextBox7.Text = db.Rows[0]["stuChangerequest"].ToString();

            //string selectcollege = "select * from collegeInfo";
            //DataTable db2 = sqlhelper.dataTableReturn(selectcollege);
            //DropDownList1.DataSource = db2;
            //DropDownList1.DataTextField = "collegeName";
            //DropDownList1.DataValueField = "collegeName";
            //DropDownList1.DataBind();
            //DropDownList1.Text = db.Rows[0]["stuCollege"].ToString();

            //string selectclass = "select * from classInfo";
            //DataTable db3 = sqlhelper.dataTableReturn(selectclass);
            //DropDownList2.DataSource = db3;
            //DropDownList2.DataTextField = "className";
            //DropDownList2.DataValueField = "className";
            //DropDownList2.DataBind();
            //DropDownList2.Text = db.Rows[0]["stuClass"].ToString();
            GetDropDownList1();
            GetDropDownList2();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        sqlHelp   sqlhelper = new sqlHelp();
        string    collegeid = Session["collegeid"].ToString();
        string    selectsql = "select * from collegeInfo where id='" + collegeid + "'";
        DataTable db        = sqlhelper.dataTableReturn(selectsql);

        Label1.Text = db.Rows[0]["collegeName"].ToString();
    }
    protected void showDropDownList1()
    {
        sqlHelp   sqlhelp   = new sqlHelp();
        string    selectSql = "select * from inquireObjectInfo";
        DataTable db        = sqlhelp.dataTableReturn(selectSql);

        DropDownList1.DataSource     = db;
        DropDownList1.DataTextField  = "inquireObject";
        DropDownList1.DataValueField = "inquireObject";
        DropDownList1.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        sqlHelp sqlhelper = new sqlHelp();

        Label1.Text = "东北大学";
        Label2.Text = sqlhelper.executeNonQueryCount("select * from departmentInfo").ToString() + "个";
        Label3.Text = sqlhelper.executeNonQueryCount("select * from collegeInfo").ToString() + "个";
        Label4.Text = sqlhelper.executeNonQueryCount("select * from classInfo").ToString() + "个";
        Label5.Text = sqlhelper.executeNonQueryCount("select * from teacherInfo").ToString() + "个";
        Label6.Text = sqlhelper.executeNonQueryCount("select * from studentInfo").ToString() + "个";
    }
Пример #10
0
    protected void showDropDownList2()
    {
        sqlHelp   sqlhelp   = new sqlHelp();
        string    selectSql = "select * from inquiryModeInfo where type in('" + 0 + "','" + 1 + "')";//默认设置为查询学生
        DataTable db        = sqlhelp.dataTableReturn(selectSql);

        DropDownList2.DataSource     = db;
        DropDownList2.DataTextField  = "inquiryMode";
        DropDownList2.DataValueField = "inquiryMode";
        DropDownList2.DataBind();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlHelp   sqlhelper = new sqlHelp();
         string    selectsql = "select * from teacherInfo";
         DataTable db        = sqlhelper.dataTableReturn(selectsql);
         GridView1.DataSource = db;
         GridView1.DataBind();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Session["departmentid"]=1;
        sqlHelp sqlhelper    = new sqlHelp();
        string  departmentid = Session["departmentid"].ToString();
        // Response.Write(departmentid);
        string    selectsql = "select * from departmentInfo where id='" + departmentid + "'";
        DataTable db        = sqlhelper.dataTableReturn(selectsql);

        Label1.Text = db.Rows[0]["departmentName"].ToString();
    }
    private void GetDropDownList1()
    {
        sqlHelp   sqlhelper = new sqlHelp();
        string    selectsql = "select * from collegeInfo";
        DataTable db        = sqlhelper.dataTableReturn(selectsql);

        DropDownList1.DataSource     = db;
        DropDownList1.DataTextField  = "collegeName";
        DropDownList1.DataValueField = "collegeName";
        DropDownList1.DataBind();
        //  DropDownList1.SelectedIndex = db.Rows.Count;
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string  id        = Request.QueryString["id"];
        sqlHelp sqlhelper = new sqlHelp();
        string  selectsql = "select * from teacherInfo where id='" + id + "'";

        if (!string.IsNullOrEmpty(TextBox1.Text))
        {
            string updatesql = "update teacherInfo set teaChangerequest='" + TextBox1.Text + "'where id='" + id + "'";
            sqlhelper.SqlServerExcute(updatesql);
            Response.Write("<script>alert('提交变更信息成功,请耐心等待管理员审核!')</script>");
        }
    }
    private void GetDropDownList2()
    {
        string    collegename = this.DropDownList1.SelectedValue.ToString();
        sqlHelp   sqlhelper   = new sqlHelp();
        string    selectsql   = "select * from classInfo where collegeName='" + collegename + "'";
        DataTable db          = sqlhelper.dataTableReturn(selectsql);

        DropDownList2.DataSource     = db;
        DropDownList2.DataTextField  = "className";
        DropDownList2.DataValueField = "className";
        DropDownList2.DataBind();
        //  DropDownList2.SelectedIndex = db.Rows.Count;
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         sqlHelp   sqlhelper = new sqlHelp();
         string    selectsql = "select * from departmentInfo";
         DataTable db        = new DataTable();
         db = sqlhelper.dataTableReturn(selectsql);
         DropDownList1.DataSource     = db;
         DropDownList1.DataTextField  = "departmentName";
         DropDownList1.DataValueField = "departmentName";
         DropDownList1.DataBind();
     }
 }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"];
        //string id = "72";
        sqlHelp sqlhelper     = new sqlHelp();
        string  changerequest = TextBox1.Text.ToString();

        if (!string.IsNullOrEmpty(TextBox1.Text))
        {
            string updatesql = "update studentInfo set stuChangerequest='" + changerequest + "'where id='" + id + "'";
            sqlhelper.SqlServerExcute(updatesql);
            Response.Write("<script>alert('提交变更信息成功,请耐心等待管理员审核!')</script>");
        }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        //Session["departmentid"] = 1;
        sqlHelp   sqlhelper         = new sqlHelp();
        string    departmentid      = Session["departmentid"].ToString();
        string    selectsql         = "select * from departmentInfo where id='" + departmentid + "'";
        DataTable db                = sqlhelper.dataTableReturn(selectsql);
        string    oldName           = db.Rows[0]["departmentName"].ToString();
        string    departmentNewName = TextBox1.Text.ToString();
        string    updatesql1        = "update departmentInfo set departmentName='" + departmentNewName + "'where id='" + departmentid + "'";

        sqlhelper.SqlServerExcute(updatesql1);
        string updatesql2 = "update teacherInfo set teaDepartment='" + departmentNewName + "'where teaDepartment='" + oldName + "'";

        sqlhelper.SqlServerExcute(updatesql2);
        Response.Write("<Script>alert('信息修改成功!');</script>");
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string  departmentName = TextBox1.Text;
        sqlHelp sqlhelper      = new sqlHelp();
        string  selectsql      = "select * from departmentInfo where departmentName='" + departmentName + "'";
        int     count          = sqlhelper.executeNonQueryCount(selectsql);

        if (count <= 0)
        {
            string insertsql = "insert into departmentInfo(departmentName) values('" + departmentName + "')";
            sqlhelper.SqlServerExcute(insertsql);
            Response.Write("<script> alert('部门添加成功,请刷新查看!');</script>");
        }
        else
        {
            Response.Write("<script> alert('部门已存在!');</script>");
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //      Session["classid"] = 39;
         sqlHelp   sqlhelper = new sqlHelp();
         string    classid   = Session["classid"].ToString();
         string    selectsql = "select * from classInfo where id='" + classid + "'";
         DataTable db        = sqlhelper.dataTableReturn(selectsql);
         Label1.Text = db.Rows[0]["className"].ToString();
         string    selectsql2 = "select * from collegeInfo";
         DataTable db2        = sqlhelper.dataTableReturn(selectsql2);
         DropDownList1.DataSource     = db2;
         DropDownList1.DataTextField  = "collegeName";
         DropDownList1.DataValueField = "collegeName";
         DropDownList1.DataBind();
     }
 }
Пример #21
0
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string  collegename = DropDownList1.Text.ToString();
        string  classname   = TextBox1.Text.ToString();
        string  selectsql   = "select * from classInfo where className='" + classname + "'and collegeName='" + collegename + "'";
        sqlHelp sqlhelper   = new sqlHelp();
        int     count       = sqlhelper.executeNonQueryCount(selectsql);

        if (count > 0)
        {
            Response.Write("<script>alert('该专业已存在!');</script>");
        }
        else
        {
            string insertsql = "insert into classInfo(className,collegeName) values('" + classname + "','" + collegename + "')";
            sqlhelper.SqlServerExcute(insertsql);
            Response.Write("<script>alert('专业添加成功,请刷新查看!');</script>");
        }
    }
Пример #22
0
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string  username  = TextBox1.Text.ToString();
        string  userpass  = TextBox2.Text.ToString();
        sqlHelp sqlhelper = new sqlHelp();

        string selectsql = "select * from adminInfo where adminName='" + username + "'";
        int    count     = sqlhelper.executeNonQueryCount(selectsql);

        if (count <= 0)
        {
            string addsql = "insert into adminInfo(adminName,adminPass) values('" + username + "','" + userpass + "')";
            sqlhelper.SqlServerExcute(addsql);
            Response.Write("<script>alert('添加成功');</script>");
        }
        else
        {
            Response.Write("<script>alert('添加失败,该管理已经存在');</script>");
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string id = Request.QueryString["id"];
         if (id != "")
         {
             sqlHelp   sqlhelper = new sqlHelp();
             string    selectsql = "select * from teacherInfo where id='" + id + "'";
             DataTable dt        = sqlhelper.dataTableReturn(selectsql);
             Label1.Text = dt.Rows[0]["teaNum"].ToString();
             Label2.Text = dt.Rows[0]["teaName"].ToString();
             Label3.Text = dt.Rows[0]["teaSex"].ToString();
             Label4.Text = dt.Rows[0]["teaID"].ToString();
             Label5.Text = dt.Rows[0]["teaNational"].ToString();
             Label6.Text = dt.Rows[0]["teaTel"].ToString();
             Label7.Text = dt.Rows[0]["teaDepartment"].ToString();
         }
     }
 }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        sqlHelp sqlhelper = new sqlHelp();
        string  username, password, verifycode1, verifycode2, loginstate;

        username    = TextBox1.Text.ToString();
        password    = TextBox2.Text.ToString();
        verifycode1 = TextBox3.Text.ToString();
        verifycode2 = Request.Cookies["verifycode"].Value.ToString();
        if (verifycode1 == verifycode2)
        {
            string selectsql = "select * from adminInfo where adminName='" + username + "'and adminPass='******'";
            int    count     = sqlhelper.executeNonQueryCount(selectsql);
            if (count > 0)
            {
                loginstate           = "登陆成功";
                Session["adminName"] = username;
                Session["adminPass"] = password;
                string datetime    = DateTime.Now.ToString();
                string ip          = Request.ServerVariables["REMOTE_ADDR"].ToString(); //取得本机IP搜索
                string strHostName = Dns.GetHostName();                                 //得到本机的主机名
                string insertsql   = "insert into loginInfo(loginname,loginState,loginTime,loginIP,loginHostname) values('" + username + "','" + loginstate + "','" + datetime + "','" + ip + "','" + strHostName + "')";
                sqlhelper.SqlServerExcute(insertsql);
                Response.Redirect("Default.aspx");
            }
            else
            {
                loginstate = "登陆失败";
                string datetime    = DateTime.Now.ToString();
                string ip          = Request.ServerVariables["REMOTE_ADDR"].ToString(); //取得本机IP搜索
                string strHostName = Dns.GetHostName();                                 //得到本机的主机名
                string insertsql   = "insert into loginInfo(loginname,loginState,loginTime,loginIP,loginHostname) values('" + username + "','" + loginstate + "','" + datetime + "','" + ip + "','" + strHostName + "')";
                sqlhelper.SqlServerExcute(insertsql);
                Response.Write("<Script>alert('用户名或密码错误');</Script>");
            }
        }
        else
        {
            Response.Write("<Script>alert('验证码错误');</Script>");
        }
    }
Пример #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            sqlHelp   sqlhelper = new sqlHelp();
            string    selectsql = "select * from collegeInfo";
            DataTable db        = new DataTable();
            db = sqlhelper.dataTableReturn(selectsql);
            DropDownList1.DataSource     = db;
            DropDownList1.DataTextField  = "collegeName";
            DropDownList1.DataValueField = "collegeName";
            DropDownList1.DataBind();


            string    selectsql2 = "select * from classInfo";
            DataTable db2        = new DataTable();
            db2 = sqlhelper.dataTableReturn(selectsql2);
            GridView1.DataSource = db2;
            GridView1.DataBind();
        }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string  username  = TextBox1.Text.ToString();
        string  userpass  = TextBox2.Text.ToString();
        string  newpass   = TextBox3.Text.ToString();
        sqlHelp sqlhelper = new sqlHelp();
        string  selectsql = "select * from adminInfo where adminName='" + username + "'and adminPass='******'";
        int     count     = sqlhelper.executeNonQueryCount(selectsql);

        if (count > 0)
        {
            sqlHelp sqlhelper1 = new sqlHelp();
            string  updatesql  = "update adminInfo set adminPass='******'where adminName='" + username + "'";
            sqlhelper1.SqlServerExcute(updatesql);
            Response.Write("<script>alert('密码修改成功!');</script>");
        }
        else
        {
            Response.Write("<script>alert('密码修改失败!');</script>");
        }
    }
Пример #27
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string object1     = DropDownList1.SelectedValue.ToString();
        string myselectsql = "";

        if (object1 == "教师")
        {
            myselectsql = "select * from inquiryModeInfo where type in('" + 0 + "','" + 2 + "')";
        }
        else if (object1 == "学生")
        {
            myselectsql = "select * from inquiryModeInfo where type in('" + 0 + "','" + 1 + "')";
        }
        //Response.Write(object1);
        sqlHelp   sqlhelp = new sqlHelp();
        DataTable db      = sqlhelp.dataTableReturn(myselectsql);

        DropDownList2.DataSource     = db;
        DropDownList2.DataTextField  = "inquiryMode";
        DropDownList2.DataValueField = "inquiryMode";
        DropDownList2.DataBind();
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string  departmentid = Convert.ToString(e.CommandArgument);
        sqlHelp sqlhelper    = new sqlHelp();

        if (e.CommandName == "del")
        {
            string    selectsql  = "select * from departmentInfo where id='" + departmentid + "'";
            DataTable db         = sqlhelper.dataTableReturn(selectsql);
            string    departname = db.Rows[0]["departmentName"].ToString();
            string    deletetea  = "delete from teacherInfo where teaDepartment='" + departname + "'";
            sqlhelper.SqlServerExcute(deletetea);
            string deletesql = "delete from departmentInfo where id='" + departmentid + "'";
            sqlhelper.SqlServerExcute(deletesql);
            Response.Write("<script>alert('部门删除成功!请刷新查看');</script>");
        }
        else if (e.CommandName == "edit")
        {
            Session["departmentid"] = departmentid;
            Response.Redirect("ModifyDepartment.aspx");
        }
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        sqlHelp sqlhelper = new sqlHelp();
        string  teaid     = Convert.ToString(e.CommandArgument);
        string  operate   = Convert.ToString(e.CommandName);

        if (operate == "del")
        {
            string deletesql = "delete from teacherInfo where id='" + teaid + "'";
            sqlhelper.SqlServerExcute(deletesql);
            Response.Write("<script>alert('删除信息成功,请刷新查看!');</script>");
        }
        else if (operate == "see")
        {
            Session["teaid"] = teaid;
            Response.Redirect("Detailteacher.aspx");
        }
        else if (operate == "edit")
        {
            Session["teaidedit"] = teaid;
            Response.Redirect("Editteacher.aspx");
        }
    }
Пример #30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //邮箱下拉菜单
        sqlHelp   sqlhelp1       = new sqlHelp();
        string    selectEmailSql = "select * from emailTab";
        DataTable db1            = sqlhelp1.dataTableReturn(selectEmailSql);

        DropDownList1.DataSource     = db1;
        DropDownList1.DataTextField  = "email";
        DropDownList1.DataValueField = "email";
        DropDownList1.DataBind();

        //师院要闻
        sqlHelp   sqlhelp2       = new sqlHelp();
        string    selectNews1Sql = "select top 9 * from newsTab where type=1 order by id desc";
        DataTable db2            = sqlhelp2.dataTableReturn(selectNews1Sql);

        GridView1.DataSource = db2;
        GridView1.DataBind();

        //院校动态
        sqlHelp   sqlhelp3          = new sqlHelp();
        string    selectDynamic1Sql = "select top 9 * from newsTab where type=2 order by id desc";
        DataTable db3 = sqlhelp3.dataTableReturn(selectDynamic1Sql);

        GridView2.DataSource = db3;
        GridView2.DataBind();


        sqlHelp   sqlhelp4           = new sqlHelp();
        string    selectRightNewsSql = "select top 14 * from newsTab where type=3 order by id desc";
        DataTable db4 = sqlhelp4.dataTableReturn(selectRightNewsSql);

        GridView3.DataSource = db4;
        GridView3.DataBind();
    }