private void btnThem_Click(object sender, EventArgs e) { FormThemDVTinh them = new FormThemDVTinh(); them.ShowDialog(); if (them.DialogResult == DialogResult.Cancel) { load(); } }
private void btnAddKieuSP_Click(object sender, EventArgs e) { FormThemDVTinh them = new FormThemDVTinh(); them.ShowDialog(); if (them.DialogResult == DialogResult.Cancel) { cbbDV.DataSource = dv.LayDVTinh(); cbbDV.DisplayMember = "TenDonViTinh"; cbbDV.ValueMember = "MaDonViTinh"; } }
private void btnSua_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow == null) { MessageBox.Show("Bạn phải chọn một dòng để sửa"); return; } int madv = Int16.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString()); FormThemDVTinh them = new FormThemDVTinh(madv); them.ShowDialog(); if (them.DialogResult == DialogResult.Cancel) { load(); } }