Beispiel #1
0
        //-----------------------------------------------------------

        #region --------------LoadData--------------
        //---------------------------------------------------------
        //LoadData
        //---------------------------------------------------------
        public void LoadData()
        {
            string             listOfIds = ShoppingCart.GetListOfItemsIdInCart();
            List <ItemsEntity> itemsList = ItemsFactory.GetInList(listOfIds);
            int quant = 0;

            foreach (ItemsEntity item in itemsList)
            {
                quant        = CheckQuant(item.ItemID);
                item.MailBox = quant.ToString();
                item.ZipCode = (Convert.ToInt32(item.Price) * quant).ToString();
            }
            if (itemsList != null && itemsList.Count > 0)
            {
                dlItems.DataSource = itemsList;
                dlItems.DataBind();
                dlItems.Visible = true;
                //lblResult.Visible = false;
            }
            else
            {
                this.Visible = false;
            }
        }