private void 添加ToolStripMenuItem_Click(object sender, EventArgs e) { num = 1; CategoryAddAndEdit ca = new CategoryAddAndEdit(); ca.ShowDialog(); }
private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { num = 0; cm.Id = int.Parse(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()); cm.Lx = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); CategoryAddAndEdit ca = new CategoryAddAndEdit(); ca.ShowDialog(); }