private void btnAdd_Click(object sender, EventArgs e) { frmValueListManageEdit frm = new frmValueListManageEdit(EditMode.Add, null); frm.MdiParent = this.MdiParent; frm.WindowState = FormWindowState.Maximized; frm.Show(); }
private void btnEdit_Click(object sender, EventArgs e) { if (dgvVList.SelectedCells.Count == 0) { Func.ShowMessage(MessageType.Warning, "没有选中值列表数据"); return; } EapValueList entity = new EapValueList(); int iRowIndex = dgvVList.CurrentCell.RowIndex; entity.VLIST_ID = dgvVList.Rows[iRowIndex].Cells["VLIST_ID"].Value.ToString(); entity.VLIST_NAME = dgvVList.Rows[iRowIndex].Cells["VLIST_NAME"].Value.ToString(); frmValueListManageEdit frm = new frmValueListManageEdit(EditMode.Edit, entity); frm.MdiParent = this.MdiParent; frm.WindowState = FormWindowState.Maximized; frm.Show(); }