private void butnew_Click(object sender, EventArgs e) { if (cmbYwlx.SelectedValue.ToString() == "002") { Guid jhid = Guid.Empty; Frmypjg frm = new Frmypjg(_menuTag, _chineseName, _mdiParent, jhid); frm.Show(); //DialogResult result = frm.ShowDialog(); //if (result == DialogResult.Cancel) //{ // butref_Click(0, e); //} } if (cmbYwlx.SelectedValue.ToString() == "001") { Guid jhid = Guid.Empty; Frmypzj frm = new Frmypzj(_menuTag, _chineseName, _mdiParent, jhid); frm.Show(); //DialogResult result= frm.ShowDialog(); //if (result == DialogResult.Cancel) //{ // butref_Click(0, e); //} } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (cmbYwlx.SelectedValue.ToString() == "002") { Guid jhid = new Guid(dataGridView1.Rows[e.RowIndex].Cells["cid"].Value.ToString()); Frmypjg frm = new Frmypjg(_menuTag, _chineseName, _mdiParent, jhid); frm.Show(); } if (cmbYwlx.SelectedValue.ToString() == "001") { Guid jhid = new Guid(dataGridView1.Rows[e.RowIndex].Cells["cid"].Value.ToString()); Frmypzj frm = new Frmypzj(_menuTag, _chineseName, _mdiParent, jhid); frm.Show(); } } }