Пример #1
0
        void ItemInfoDisplay(string id)
        {
            var item = new Item(enc.DecryptString(id, SV.Key));

            Session["item"]       = item.Name;
            costText.InnerText    = SV.GetUGX(item.Price);
            desc.InnerText        = item.Description;
            ModelITemLiteral.Text = elements.GetItemToCart(item.Id, SV.GetImage(item.Picture));
            ItemBtnCart.Text      = elements.BtnAddToCart(enc.EncryptString(item.Id, SV.Key));
        }
Пример #2
0
        private void Item()
        {
            int    pos      = 0;
            string d        = string.Empty;
            var    itemList = new Item().getAllRecords(Item_support.Column.Name, Item_support.Order.ASCENDING);

            foreach (var item in itemList)
            {
                if (pos % 3 == 0)
                {
                    d += "<div class='row'>";
                }
                d += elements.DisplayItems(enc.EncryptString(item.Id, SV.Key), SV.GetImage(item.Picture), item.Name, item.Description, SV.GetUGX(item.Price));
                if (pos % 3 == 2)
                {
                    d += "</div>";
                }
                pos++;
            }
            if (pos % 3 != 0)
            {
                d += "</div>";
            }
            ITemLiteral.Text = d;
        }