Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Turned off
        AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.MoneyGiftCardsEnabled);

        cards = GiftCard.GetActiveCards();

        if (!Page.IsPostBack)
        {
            //Setup
            GiftCardsGridView.EmptyDataText = U4000.NOGIFTCARDS;

            //Append Data
            GiftCardsGridView.DataSource = GetGridViewData();
            GiftCardsGridView.DataBind();
        }

        //ListPanelsPlaceHolder
        if (ListPanelsPlaceHolder.Controls.Count == 0)
        {
            foreach (var card in cards)
            {
                ListPanelsPlaceHolder.Controls.Add(GeneratePanel(card));
            }
        }
    }
Ejemplo n.º 2
0
 protected void GiftCardsGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GiftCardsGridView.PageIndex  = e.NewPageIndex;
     GiftCardsGridView.DataSource = GetGridViewData();
     GiftCardsGridView.DataBind();
 }