コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["person"] != null)
        {
            int         pk    = (int)Session["Person"];
            GetDonation gd    = new GetDonation();
            DataTable   table = gd.GetDonations(pk);

            foreach (DataRow row in table.Rows)
            {
                lblHello.Text = "Welcome" + row["PersonFirstName"].ToString() + row["PersonLastName"].ToString();
            }
            grdDonations.DataSource = table;
            grdDonations.DataBind();
        }
        else
        {
            //Response.Redirect("Login.aspx");
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["person"] != null)
        {
            int pk = (int)Session["Person"];
            GetDonation gd = new GetDonation();
            DataTable table = gd.GetDonations(pk);

            foreach (DataRow row in table.Rows)
            {
                lblHello.Text = "Welcome" + row["PersonFirstName"].ToString() + row["PersonLastName"].ToString();
            }
            grdDonations.DataSource = table;
            grdDonations.DataBind();

        }
        else
        {
            //Response.Redirect("Login.aspx");
        }
    }