⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stuactivityinstance.aspx.cs

📁 一个研究生管理系统 具体的情况自己看了
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class student_stuactivityinstance : System.Web.UI.Page
{
    public DataTable dt = null;
    public int index = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["Student"].ToString()!= "true")
            {
                Response.Write("<script>parent.window.href=\"../login.aspx\"</script>");
                Response.End();
            }
        }
        catch
        {
            Response.Write("<script>parent.window.href=\"../login.aspx\"</script>");
            Response.End();
        }
        //Session["StuID"]放的是学生的学号这个对象;
        try
        {
            dt = Student.Student.GetIndividualActivityInfo(Session["StuID"].ToString());
        }
        catch (Exception ex)
        {
            Response.Write("<script> alert(\'" + ex.Message + "\');</script>");
        }
    }
    public void GetSingleActivityAllInfo()
    {
        try
        {
            Response.Write("<tr>");
            Response.Write("<td align=right class=mode4 style=\"height: 23px; width: 92%;text-align:center\">");
            Response.Write(dt.Rows[index]["ActivityName"].ToString());
            Response.Write("</td>");
            //Response.Write("<td width=\"8%\" align=left class=mode5 style=\"height: 23px\"><div align=\"center\"><a href=\"#\" OnClick=\"showModalDialog('seeactivivatedinfo.aspx?activityid=" + dt.Rows[index]["ActivityID"].ToString() + "',' ','dialogHeight:490px;dialogWidth:650px')\">查看</a></div></td>");
            Response.Write("<td width=\"8%\" align=left class=mode5 style=\"height: 23px\"><div align=\"center\"><a href=\"#\" OnClick=\"showModalDialog('seeactivivatedinfo.aspx?activityid=" + dt.Rows[index]["ActivityID"].ToString() + "',' ','dialogHeight:490px;dialogWidth:650px')\">查看</a></div></td>");
            
            Response.Write("</tr>");
            Response.Write("<tr>");
            Response.Write("<td colspan=2><img src=images/blank.gif height=6></td>");
            Response.Write("</tr>");
        }
        catch (Exception ex)
        {
            Response.Write("<script> alert(\'" + ex.Message + "\');</script>");
        }
    }
    public void GetAllActivityAllInfo()
    {
        try
        {
            if (dt != null)
            {
                // int i = dt.Rows.Count;
                for (index = 0; index < dt.Rows.Count; index++)
                {
                    GetSingleActivityAllInfo();
                }
            }
            else
            {
                Response.Write("<script> alert('您目前未参加过任何活动');</script>");
            }

        }
        catch (Exception ex)
        {
            Response.Write("<script> alert(\'" + ex.Message + "\');</script>");
        }
    }
    

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -