Example #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            Billing secondForm = new Billing();

            secondForm.Show();
            this.Close();
        }
Example #2
0
        private void btnCheckOut_Click(object sender, EventArgs e)
        {
            Billing secondForm = new Billing();

            secondForm.Show();

            //open new stream
            FileStream   outFile = new FileStream("CartItems.txt", FileMode.Create, FileAccess.Write);
            StreamWriter writer  = new StreamWriter(outFile);

            //record data to session.txt
            writer.WriteLine(total);
            int itemsNum = lstCart.Items.Count;

            for (int z = 0; z < itemsNum; z++)
            {
                writer.WriteLine(lstCart.Items[z].ToString());
            }

            writer.Close();
            outFile.Close();
        }
Example #3
0
        private void btnCheckOut_Click(object sender, EventArgs e)
        {
            Billing secondForm = new Billing();
            secondForm.Show();

            //open new stream
            FileStream outFile = new FileStream("CartItems.txt", FileMode.Create, FileAccess.Write);
            StreamWriter writer = new StreamWriter(outFile);

            //record data to session.txt
            writer.WriteLine(total);
            int itemsNum = lstCart.Items.Count;
            for (int z = 0; z < itemsNum; z++)
            {

                writer.WriteLine(lstCart.Items[z].ToString());

            }

            writer.Close();
            outFile.Close();
        }
 private void btnBack_Click(object sender, EventArgs e)
 {
     Billing secondForm = new Billing();
     secondForm.Show();
     this.Close();
 }