예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            this.Master.name.Text = Session["User"].ToString();
        }
        catch (Exception ex)
        {
            Response.Redirect("index.aspx");
        }
        int         sid  = Convert.ToInt32(Session["Feedback_Key"]);
        FeedbackDAL fdal = new FeedbackDAL();
        DataSet     ds   = fdal.GetAll(sid);

        if (ds.Tables[0].Rows.Count > 0)
        {
            DataTable dt = ds.Tables[0];
            DataRow   dr = dt.Rows[0];

            string a = Session["Feedback_Key"].ToString();
            string b = dr["student_id"].ToString();
            if (a == b)
            {
                pnlFeedback.Visible = false;
                lblSubmitted.Text   = "Feedback Already Submitted";
            }
        }
    }