Exemple #1
0
        private void btnVoid_Click(object sender, EventArgs e)
        {
            if (lvOrderHist.SelectedItems.Count == 0)
            {
                return;
            }
            if (MessageBox.Show("Do you want to void this?", "Void", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            QueueLines qi = new QueueLines();

            qi.ID = Convert.ToInt32(lvOrderHist.SelectedItems[0].Tag);
            qi.LoadLines();
            qi.voidOrder(Convert.ToInt32(lvOrderHist.SelectedItems[0].Tag));

            ClientOrder cl = new ClientOrder();

            cl.AmountDue = Convert.ToDouble(lvOrderHist.SelectedItems[0].SubItems[4].Text);
            cl.UpdateAmountDue(Convert.ToInt32(lvOrderHist.SelectedItems[0].SubItems[6].Text));

            MessageBox.Show("Successfully voided.", "Void", MessageBoxButtons.OK, MessageBoxIcon.Information);
            LoadOrder();
        }
Exemple #2
0
        private void btnVoidWO_Click(object sender, EventArgs e)
        {
            if (lvOrderNum.SelectedItems.Count == 0)
            {
                return;
            }

            int idx = Convert.ToInt32(lvOrderNum.SelectedItems[0].Tag);

            ClientOrder cl = new ClientOrder();

            cl.Void_ClientOrder(idx);

            Queue q = new Queue();

            q.Void_Oueue(idx);

            int i;

            for (i = 0; i <= lvOrderNum.Items.Count - 1; i++)
            {
                QueueLines ql = new QueueLines();
                ql.voidOrder(Convert.ToInt32(lvOrderNum.Items[i].Tag));
            }

            MessageBox.Show("Successfully voided.", "Void", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
            LoadWholeOder();
            lvWholeOrder.Items.Clear();
        }