private void btnThem_Click(object sender, EventArgs e) { frmThemSuaSanPham frm = new frmThemSuaSanPham(); frm.themSanPham += XuLyThemSanPham; frm.ShowDialog(); }
private void dgvSanPham_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvSanPham.SelectedRows[0].Index != -1) { string strMaSP = dgvSanPham.SelectedRows[0].Cells["colMaSP"].Value.ToString(); frmThemSuaSanPham frm = new frmThemSuaSanPham(strMaSP); frm.ShowDialog(); } }
private void btnSua_Click(object sender, EventArgs e) { if (dgvSanPham.SelectedRows[0].Index != -1) { string strMaSP = dgvSanPham.SelectedRows[0].Cells["colMaSP"].Value.ToString(); frmThemSuaSanPham frm = new frmThemSuaSanPham(strMaSP); frm.suaSanPham += XuLySuaSanPham; frm.ShowDialog(); } }