Пример #1
0
        private void Item()
        {
            DataTable dt = bllPro.AllProduct();

            for (int j = 0; j < dt.Rows.Count; j++)
            {
                ListItem listItems = new ListItem();
                listItems.NameProduct   = dt.Rows[j][0].ToString();
                listItems.PriceProduct  = dt.Rows[j][1].ToString();
                listItems.AmountProduct = dt.Rows[j][2].ToString();
                listItems.PercentSale   = dt.Rows[j][3].ToString();
                listItems.ImageProduct  = (byte[])dt.Rows[j][4];
                listItems.Width         = 200;
                listItems.Height        = 180;
                fPanelAllProduct.Controls.Add(listItems);
            }
        }
Пример #2
0
        private void Item()
        {
            DataTable dt = blProd.AllProduct();

            for (int j = 0; j < dt.Rows.Count; j++)
            {
                ListItem listItems = new ListItem();
                listItems.NameProduct   = dt.Rows[j][0].ToString();
                listItems.PriceProduct  = dt.Rows[j][1].ToString();
                listItems.AmountProduct = dt.Rows[j][2].ToString();
                listItems.PercentSale   = dt.Rows[j][3].ToString();
                listItems.ImageProduct  = (byte[])dt.Rows[j][4];
                listItems.Width         = 199;
                listItems.Height        = 170;
                fPanelSell.Controls.Add(listItems);
                listItems.pictureBoxImageProductSale.Click += pictureBoxImageProductSale_Click;
                listItems.lblPriceProductSale.Click        += lblPriceProductSale_Click;
                listItems.btnUserCtrPercent.Click          += btnUserCtrPercent_Click;
                listItems.lblAmout.Click += lblAmout_Click;
            }
        }