示例#1
0
    protected void gvDividendPaidA_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        //page index changing -- gridview for paid attraction
        gvDividendPendingA.PageIndex = e.NewPageIndex;
        List <Dividend> dvPaidList = DividendDB.getAllAttractionPaidDividendsByID(((Attraction)Session["userAttraction"]).AttractionID.ToString());

        gvDividendPaidA.DataSource = dvPaidList;
        gvDividendPaidA.DataBind();
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //use try and catch if the session is null
        try
        {
            //to show the dividend pending list
            List <Dividend> dvPendingList = DividendDB.getAllAttractionPendingDividendsByID(((Attraction)Session["userAttraction"]).AttractionID.ToString());
            gvDividendPendingA.DataSource = dvPendingList;
            gvDividendPendingA.DataBind();

            //to show the dividend paid list
            List <Dividend> dvPaidList = DividendDB.getAllAttractionPaidDividendsByID(((Attraction)Session["userAttraction"]).AttractionID.ToString());
            gvDividendPaidA.DataSource = dvPaidList;
            gvDividendPaidA.DataBind();
        }
        catch (Exception ex)
        {
        }
    }