Example #1
0
        private void buttonSweet_Click(object sender, EventArgs e)
        {
            FormSweet formSweet = new FormSweet();

            formSweet.Owner = this;
            formSweet.Show();
        }
Example #2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormSweet formSweet = this.Owner as FormSweet;

            FormOrder main = formSweet.Owner as FormOrder;

            candy.Name   = listCandy.Text;
            candy.Weight = (double)weight.Value;

            main.order.ListGoods.Add(candy);
            main.labelOrder.Text      = main.order.ToString();
            main.labelTotalPrice.Text = Convert.ToString(main.order.TotalPrice);
            this.Close();
            formSweet.Close();
        }