Esempio n. 1
0
        private void AddItemListView(int idCash)
        {
            Good[] details = Shop.GetGoodsOperations(idCash);
            lvDetails.Items.Clear();
            ListViewItem lvi;

            ListViewItem.ListViewSubItem lvsi;

            foreach (Good g in details)
            {
                lvi      = new ListViewItem();
                lvi.Text = g.Name;

                lvsi      = new ListViewItem.ListViewSubItem();
                lvsi.Text = g.Barcode;
                lvi.SubItems.Add(lvsi);

                lvsi      = new ListViewItem.ListViewSubItem();
                lvsi.Text = g.PriceOut.ToString();
                lvi.SubItems.Add(lvsi);

                lvsi      = new ListViewItem.ListViewSubItem();
                lvsi.Text = g.Count.ToString();
                lvi.SubItems.Add(lvsi);

                lvsi      = new ListViewItem.ListViewSubItem();
                lvsi.Text = (g.Count * g.PriceOut).ToString();
                lvi.SubItems.Add(lvsi);

                lvDetails.Items.Add(lvi);
            }
        }