private void toolStripButton1_Click(object sender, EventArgs e) { FormMatErrAdd fma = new FormMatErrAdd(); fma.type = "add"; fma.ErrInfoFormChange_ += new FormMatErrAdd.ErrInfoFormChange(MatErrAddForm_ErrInfoFormChange); fma.ShowDialog(); }
private void toolStripButton2_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { int curindex_ = this.dataGridView1.CurrentRow.Index; if (this.dataGridView1.SelectedRows[0].Cells["sysid"].Value == null) { return; } string sysid_ = this.dataGridView1.SelectedRows[0].Cells["sysid"].Value.ToString().Trim(); if (sysid_ == "") { return; } FormMatErrAdd fma = new FormMatErrAdd(); fma.sysid_ = sysid_; fma.type = "edit"; fma.ErrInfoFormChange_ += new FormMatErrAdd.ErrInfoFormChange(MatErrAddForm_ErrInfoFormChange); fma.ShowDialog(); } }