private void btMonCu_Click(object sender, EventArgs e) { FQlyMonCu MenuMonCu = new FQlyMonCu(); MenuMonCu.FormClosing += MenuMonCu_FormClosing; MenuMonCu.ShowDialog(); }
private void btLuuLai_Click_1(object sender, EventArgs e) { DialogResult traloi; traloi = MessageBox.Show("Bạn có muốn lưu lại món cũ", "Trả lời", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (traloi == DialogResult.Yes) { string active = "Yes"; string tt; if (lbTrangThai.Text == "Hiện có") { tt = "Yes"; } else { tt = "No"; } cFood.UpdateFood(Convert.ToInt32(Id), lbTen.Text, Convert.ToInt32(lbGia.Text), tt, Convert.ToInt32(lbGiamGia.Text), active, lbLoai.Text); FQlyMonCu qlyMonCu = (FQlyMonCu)this.ParentForm; qlyMonCu.Reload(); } }