Exemplo n.º 1
0
 private void btnThemMon_Click(object sender, EventArgs e)
 {
     if (txtTenMon.Text == "" || txtTenMon.Text == null || txtLoaiMon.Text == "" || txtLoaiMon.Text == null ||
         txtGia.Text == "" || txtGia.Text == null)
     {
         SanPham      sanPham    = new SanPham(lblMaMonRandom.Text, txtTenMon.Text, txtLoaiMon.Text, "", float.Parse(txtGia.Text));
         DialogResult ketQuaChon = MetroMessageBox.Show(Owner, "Bạn muốn thêm món này vào danh sách ?", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
         if (ketQuaChon == DialogResult.OK)
         {
             bus_SanPham.themSanPham(sanPham);
             MetroMessageBox.Show(Owner, "Đã thêm món thành công bạn sẽ được chuyển về giao diện quản lý món", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             dongFormQuanLyMon();
             FormQuanLyMon form = new FormQuanLyMon();
             form.Show();
         }
     }
 }
Exemplo n.º 2
0
        private void chucNangQLMon_Click(object sender, EventArgs e)
        {
            FormQuanLyMon formQuanLyMon = new FormQuanLyMon();

            formQuanLyMon.Show();
        }