//sửa nhà cung cấp private void button8_Click(object sender, EventArgs e) { NHACUNGCAP entity = new NHACUNGCAP(); entity.MANHACUNGCAP = suamanhacungcaptxt.Text; entity.TENNHACUNGCAP = suatennhacungcaptxt.Text; entity.DIACHI = suadiachinhacungcaptxt.Text; entity.DIENTHOAI = suadienthoainhacungcaptxt.Text; nhacungcapbus bus = new nhacungcapbus(); bool success = bus.update(entity); common.successorerror(success); if (success) { errorProvider1.Clear(); common.ClearTextBoxes(tabPage9); nhacungcapdgv.DataSource = bus.findall(textBox1.Text); nhacungcapdgv.Columns["PHIEUNHAPHANGs"].Visible = false; } else { ViewErrors(bus.validatedictionary); } }
//tìm kiếm nhà cung cấp private void textBox1_TextChanged(object sender, EventArgs e) { nhacungcapbus bus = new nhacungcapbus(); nhacungcapdgv.DataSource = bus.findall(textBox1.Text); nhacungcapdgv.Columns["PHIEUNHAPHANGs"].Visible = false; }