Пример #1
0
        public virtual void 設定飲料(單點 other)
        {
            if (other.Type() == "貴的飲料")
            {
                Price += 15;
            }

            this.飲料 = other;
        }
Пример #2
0
        public void  重複添加(單點 other)

        {
            int number = 1;

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                if (row.Cells[0].Value != null)
                {
                    if (row.Cells[0].Value.ToString() == other.GetName())
                    {
                        number = (int)row.Cells[2].Value + 1;
                        dataGridView1.Rows.Remove(row);
                    }
                }
            }

            dataGridView1.Rows.Add(other.GetName(), other.GetPrice(), number, number * other.GetPrice());

            B總價_Click(sender, e);
        }
Пример #3
0
 public 加大(單點 other)
 {
     this.單點 = other;
 }
Пример #4
0
 public virtual void 設定配料(單點 other)
 {
     this.配料 = other;
 }
Пример #5
0
 public virtual void 設定主菜(單點 other)
 {
     this.主菜 = other;
 }
Пример #6
0
 public 卡拉雞腿堡(單點 HAMBURGER)
 {
     this.hamburger = HAMBURGER;
 }