Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Establishment es = (Establishment)Session["establishment"];


        List <ShowOrgan> solist = ShowOrganDB.getAllDOrganListByDonor(es.ID);

        if (solist.Count == 0)
        {
            panelother.Visible = false;
            lblSorry.Visible   = true;
        }
        else
        {
            lblSorry.Visible   = false;
            panelother.Visible = true;
            gvDonor.DataSource = solist;
            gvDonor.DataBind();
        }

        List <ShowOrgan> solist2 = ShowOrganDB.getAllDOrganListByReceiver(es.ID);

        if (solist2.Count == 0)
        {
            panelfrom.Visible = false;
            lblsorry2.Visible = true;
        }
        else
        {
            lblsorry2.Visible    = false;
            panelfrom.Visible    = true;
            GridView1.DataSource = solist2;
            GridView1.DataBind();
        }
    }
Exemple #2
0
    protected void gvDonor_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        Establishment    es     = (Establishment)Session["establishment"];
        List <ShowOrgan> solist = ShowOrganDB.getAllLOrganListByReceiver(es.ID);

        gvDonor.PageIndex  = e.NewPageIndex;
        gvDonor.DataSource = solist;
        gvDonor.DataBind();
    }