Exemplo n.º 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            ItemChiTietLoaiSanPham frm = new ItemChiTietLoaiSanPham("");

            frm.ShowDialog();
            if (frm.check == true)
            {
                DataTable DT = _LoaiSanPhamTableAdapter.GetData();
                dtgLoaiSanPham.DataSource = DT.DefaultView;
            }
        }
Exemplo n.º 2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string s = dtgLoaiSanPham.CurrentRow.Cells["MaLoaiSP"].Value.ToString();
            ItemChiTietLoaiSanPham frm = new ItemChiTietLoaiSanPham(s);

            frm.ShowDialog();
            if (frm.check == true)
            {
                DataTable DT = _LoaiSanPhamTableAdapter.GetData();
                dtgLoaiSanPham.DataSource = DT.DefaultView;
            }
        }