private void butnew_Click(object sender, System.EventArgs e) { try { FrmCGMX f = new FrmCGMX(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.MdiParent = _mdiParent; f.Show(); } catch (System.Exception err) { MessageBox.Show(err.Message); } }
private void butsh_Click(object sender, System.EventArgs e) { try { int nrow = this.myDataGrid1.CurrentCell.RowNumber; DataTable tb = (DataTable)this.myDataGrid1.DataSource; if (tb.Rows.Count == 0) { return; } FrmCGMX f = new FrmCGMX(_menuTag, _chineseName, _mdiParent); Point point = new Point(160, 75); f.Location = point; f.MdiParent = _mdiParent; f.Show(); f.FillDj(new Guid(tb.Rows[nrow]["id"].ToString()), this.rdo2.Checked); } catch (System.Exception err) { MessageBox.Show("发生错误" + err.Message); } }