private void btnThem_Click(object sender, EventArgs e) { Them_SuaNCC frm = new Them_SuaNCC(); frm.Text = "Thêm nhà cung cấp"; frm.ShowDialog(); NhaCungCap_Load(sender, e); }
private void btnThemNhaCungCap_Click(object sender, EventArgs e) { Them_SuaNCC.Check = true; Them_SuaNCC them = new Them_SuaNCC(); them.Text = "Thêm nhà cung cấp"; them.ShowDialog(); GetNCC(); }
private void btnSua_Click(object sender, EventArgs e) { Them_SuaNCC frm = new Them_SuaNCC { Text = "Sửa nhà cung cấp" }; if (dgvNhaCungCap.Rows.Count <= 0) { return; } if (dgvNhaCungCap.CurrentRow != null) { Them_SuaNCC.mancc = dgvNhaCungCap.CurrentRow.Cells[0].Value.ToString(); Them_SuaNCC.tenncc = dgvNhaCungCap.CurrentRow.Cells[1].Value.ToString(); Them_SuaNCC.sdt = dgvNhaCungCap.CurrentRow.Cells[2].Value.ToString(); Them_SuaNCC.diachi = dgvNhaCungCap.CurrentRow.Cells[3].Value.ToString(); } Them_SuaNCC.Check = false; frm.ShowDialog(); NhaCungCap_Load(sender, e); }