Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmMenuManageEdit frm = new frmMenuManageEdit(EditMode.Add, null);

            frm.MdiParent   = this.MdiParent;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgv.SelectedCells.Count == 0)
            {
                Func.ShowMessage(MessageType.Warning, "没有选中菜单");
                return;
            }

            EapMenu entity = new EapMenu();

            int iRowIndex = dgv.CurrentCell.RowIndex;

            entity.MENU_ID        = dgv.Rows[iRowIndex].Cells["MENU_ID"].Value.ToString();
            entity.MENU_NAME      = dgv.Rows[iRowIndex].Cells["MENU_NAME"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["MENU_NAME"].Value.ToString();
            entity.PARENT_MENU_ID = dgv.Rows[iRowIndex].Cells["PARENT_MENU_ID"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["PARENT_MENU_ID"].Value.ToString();
            entity.FORM_NAME      = dgv.Rows[iRowIndex].Cells["FORM_NAME"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["FORM_NAME"].Value.ToString();
            entity.ASSEMBLY_NAME  = dgv.Rows[iRowIndex].Cells["ASSEMBLY_NAME"].Value == null ? string.Empty : dgv.Rows[iRowIndex].Cells["ASSEMBLY_NAME"].Value.ToString();

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

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