private void BrandAdd_Click(object sender, EventArgs e) { BrandAdd brandAddForm = new BrandAdd(); brandAddForm.Show(); brandAddForm.FormClosed += childClose; this.Tag = tag_insert; }
private void updateBrand(object sender, EventArgs e) { Brand brand = (Brand)dataGridView1.CurrentRow.Tag; if (brand == null) { Tool.show("请选择一行"); return; } BrandAdd brandAddForm = new BrandAdd(); brandAddForm.Tag = brand; brandAddForm.update(brand); brandAddForm.Show(); brandAddForm.FormClosed += childClose; this.Tag = tag_update; }