Beispiel #1
0
 public Sale_Form(string r)
 {
     InitializeComponent();
     richTextBox1.ReadOnly = true;
     CheckID_button.Show();
     Thanks_label.Hide();
     V1_Picture.Hide();
     V2_Picture.Hide();
     comboBox1.DataSource = Enum.GetValues(typeof(PaymentMethod));
     records             = new List <Record>();
     ID_TextBox.ReadOnly = false;
     this.role           = r;
 }
Beispiel #2
0
        private void clear_button_Click(object sender, EventArgs e)
        {
            foreach (Record r in records)
            {
                r.setQuantityInStock(r.getQuantityInStock() + quantity);
            }

            customer   = null;
            IsCustomer = false;
            IsBarCode  = false;

            V1_Picture.Hide();
            V2_Picture.Hide();
            CheckID_button.Show();
            ID_TextBox.Text      = "Customer ID";
            barcode_textbox.Text = "BarCode";
            richTextBox1.Text    = "";
            price_textbox.Text   = "";
            numericUpDown1.Value = 1;
            totalPrice           = 0;
            ID_TextBox.ReadOnly  = false;
            map.Clear();
            records.Clear();
        }
Beispiel #3
0
        private void clear_button_Click(object sender, EventArgs e)
        {
            if (isSubmit == false)
            {
                Record r;
                for (int i = 0; i < textBoxes.Count(); i = i + 4)
                {
                    if (textBoxes[i].Text != "")
                    {
                        r = Program.GetRecordByQR(int.Parse(textBoxes[i].Text));
                        r.setQuantityInStock(r.getQuantityInStock() + int.Parse(textBoxes[i + 3].Text));
                    }
                }
            }

            foreach (TextBox tb in textBoxes)
            {
                tb.Clear();
            }

            V1_Picture.Hide();
            V2_Picture.Hide();
            CheckID_button.Show();
            records.Clear();
            customer   = null;
            record     = null;
            IsCustomer = false;
            IsBarCode  = false;
            isSubmit   = false;
            customer_ID_textbox.Text = "Customer ID";
            Barcode_textbox.Text     = "BarCode";
            submit_button.Show();

            // this.Hide();
            // Lending_Form lf=new Lending_Form();
        }