private void btAdd_Click(object sender, EventArgs e) { SanPhamChiTiet_Form frm = new SanPhamChiTiet_Form(); frm.ShowDialog(); LoadData(); }
private void btEdit_Click(object sender, EventArgs e) { id_sp = int.Parse(dgvSanPham.Rows[dgvSanPham.CurrentCell.RowIndex].Cells["ma_sp"].Value.ToString()); SanPhamChiTiet_Form frm = new SanPhamChiTiet_Form(id_sp); frm.ShowDialog(); LoadData(); }
private void btEdit_Click(object sender, EventArgs e) { id_sp = int.Parse(dgvSanPham.Rows[dgvSanPham.CurrentCell.RowIndex].Cells["ma_sp"].Value.ToString()); if (id_sp != 0) { SanPhamChiTiet_Form frm = new SanPhamChiTiet_Form(); frm.ShowDialog(); } else { MessageBox.Show("Hãy chọn mục cần sửa"); } }
private void btAdd_Click(object sender, EventArgs e) { SanPhamChiTiet_Form frm = new SanPhamChiTiet_Form(); frm.ShowDialog(); }