private void themLoaiSp_Click(object sender, EventArgs e) { _itemLoaiSP = new ItemLoaiSanPham(""); _itemLoaiSP.ShowDialog(); if (_itemLoaiSP.ChekKq == true) { DataTable _data = _adapterLoaiSP.GetData(); showLoaiSP.DataSource = _data.DefaultView; } }
private void XoaLoaiSp_Click(object sender, EventArgs e) { string maloaisp = showLoaiSP.CurrentRow.Cells["MaLoaiSP"].Value.ToString(); _itemLoaiSP = new ItemLoaiSanPham(maloaisp); _adapterLoaiSP.XoaLoaiSP(maloaisp); MessageBox.Show("Xóa Thành Công"); DataTable _data = _adapterLoaiSP.GetData(); showLoaiSP.DataSource = _data.DefaultView; }
private void SuaLoaiSP_Click(object sender, EventArgs e) { string maLoaiSp = showLoaiSP.CurrentRow.Cells["MaLoaiSP"].Value.ToString(); _itemLoaiSP = new ItemLoaiSanPham(maLoaiSp); _itemLoaiSP.ShowDialog(); if (_itemLoaiSP.ChekKq == true) { DataTable _data = _adapterLoaiSP.GetData(); showLoaiSP.DataSource = _data.DefaultView; } }