private void button2_Click(object sender, EventArgs e) { 原料选择 win = new 原料选择(textBox产品.Text); win.ShowDialog(); dataGridView2.DataSource = pm.GetMaterialProductRelationByProduct(textBox产品.Text); dataGridView2.Update(); }
private void button2_Click(object sender, EventArgs e) { try { 原料选择 win = new 原料选择(textBox产品.Text); win.ShowDialog(); dataGrid产品原料关系.DataSource = pm.GetMaterialProductRelationByProduct(textBox产品.Text); dataGrid产品原料关系.Update(); } catch (Exception ex) { MessageBox.Show(ex.Message); }; }