Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!IsPostBack)
                {
                    OfferedPizza offerPizza = HelperSession.GetOfferPizza(Session);

                    List <Ingredient> listIngredientsAll   = HelperSession.GetListIngredientsAll(Session);
                    List <Ingredient> listIngredientsOffer = HelperIngredient.Connect(offerPizza.Ingredients, listIngredientsAll);

                    HelperSession.SetListIngredientsOffer(Session, listIngredientsOffer);

                    GvListIngredients.DataSource = listIngredientsOffer;
                    GvListIngredients.DataBind();

                    LbTitle.Text = offerPizza.Name;
                    LbPrice.Text = offerPizza.Price.ToString("0.00") + "";

                    HelperSession.SetListIngredientsSelected(Session, offerPizza.Ingredients);
                }
            }
        }