private void MaterialdataGridView1_DoubleClick(object sender, EventArgs e) { frmMaterialAdd frmsub = new frmMaterialAdd(MaterialdataGridView1.CurrentRow); frmsub.Show(); frmsub.buttonSaveNew.Enabled = false; frmsub.buttonSave.Enabled = true; }
private void buttonAdd_Click(object sender, EventArgs e) { frmMaterialAdd frmMaterialAdd = new frmMaterialAdd(); frmMaterialAdd.Show(); frmMaterialAdd.textBoxID.Enabled = true; frmMaterialAdd.buttonSave.Enabled = false; frmMaterialAdd.buttonSaveNew.Enabled = true; }