Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int count = listView1.SelectedItems.Count;

            if (count == 1)
            {
                ListViewItem  itemSelected = listView1.SelectedItems[0];
                PPCustomerTab ppTab        = (PPCustomerTab)itemSelected.Tag;

                if (ppTab != null)
                {
                    // create invoice and associated with internal tab
                    String invoiceId = CreateInvoice(locationId, ppTab.id);
                    //if (invoiceId != null)
                    {
                        ppTab.invoiceId = invoiceId;

                        itemSelected.SubItems[4].Text = "YES";
                        itemSelected.BackColor        = Color.AliceBlue;
                        itemSelected.Selected         = true;
                        listView1.Select();
                    }
                }
            }
        }
Esempio n. 2
0
        void AddToList(PPCustomerTab tab)
        {
            ListViewItem item = new ListViewItem(tab.customerName);

            item.Tag = tab;
            item.SubItems.Add(tab.createDate);
            item.SubItems.Add(tab.expirationDate);
            item.SubItems.Add(tab.status);
            item.SubItems.Add("No");

            listView1.Items.Add(item);
        }
Esempio n. 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show("charging...");

            ITabManager tabMgr = retailMgr.GetTabManager();
            int         count  = listView1.SelectedItems.Count;

            if (count == 1)
            {
                ListViewItem  itemSelected = listView1.SelectedItems[0];
                PPCustomerTab ppTab        = (PPCustomerTab)itemSelected.Tag;

                if (ppTab != null)
                {
                    //tabMgr.ChargeTab(ppTab);
                }
            }
        }