private void buttonX1_Click(object sender, EventArgs e)
 {
     if (textBoxX1.Text != "")
     {
         ThucDon.UpdateThucDon thucdon = new ThucDon.UpdateThucDon();
         thucdon.UpdateNhomDanhMucThucDon(Nhom, textBoxX1.Text);
         this.Close();
     }
     else
     {
         MessageBox.Show("Bạn chưa điền");
     }
 }
Beispiel #2
0
        private void toolStripMenuItemXoaMon_Click(object sender, EventArgs e)
        {
            try
            {
                int MaMon = Convert.ToInt32(dataGridViewXThucDon.SelectedRows[0].Cells[1].Value.ToString());
                DialogResult dialogResult = MessageBox.Show("Bạn có chắc chắn xóa?", "Xóa Món", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    ThucDon.UpdateThucDon thucDon = new ThucDon.UpdateThucDon();
                    thucDon.DeleteThucDon(MaMon);
                    LoadDataGridViewThucDon();
                }
            }
            catch (Exception)
            {

                MessageBox.Show("Bạn chưa chọn món");
            }
        }
Beispiel #3
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     ThucDon.UpdateThucDon thucdon = new ThucDon.UpdateThucDon();
     int MaDanhMuc = Convert.ToInt32(comboTreeDanhMuc.SelectedValue.ToString());
     string Ten = txtThucDon.Text;
     string DonVi = comboTreeDonVi.Text;
      float Gia = a;
      string Anh = path;
      thucdon.UpdateMonAn(MaMonAn, Ten, DonVi, Gia, Anh, MaDanhMuc);
      this.Close();
 }