Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmSystemParameterManageEdit frm = new frmSystemParameterManageEdit(EditMode.Add, null);

            frm.MdiParent   = this.MdiParent;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgv.SelectedCells.Count == 0)
            {
                Func.ShowMessage(MessageType.Warning, "没有选中系统参数数据");
                return;
            }

            EapParameter entity = new EapParameter();

            int iRowIndex = dgv.CurrentCell.RowIndex;

            entity.PARA_ID    = dgv.Rows[iRowIndex].Cells["PARA_ID"].Value.ToString();
            entity.PARA_NAME  = dgv.Rows[iRowIndex].Cells["PARA_NAME"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["PARA_NAME"].Value.ToString();
            entity.PARA_VALUE = dgv.Rows[iRowIndex].Cells["PARA_VALUE"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["PARA_VALUE"].Value.ToString();

            frmSystemParameterManageEdit frm = new frmSystemParameterManageEdit(EditMode.Edit, entity);

            frm.MdiParent   = this.MdiParent;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }