private void btnBack_Click(object sender, EventArgs e) { Billing secondForm = new Billing(); secondForm.Show(); this.Close(); }
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(); }