Exemplo n.º 1
0
        void ucToolBar_OnAddClick(object sender, EventArgs e)
        {
            EditTunnelFrm editFrm = new EditTunnelFrm();

            editFrm.FormClosed += new FormClosedEventHandler(editFrm_FormClosed);
            editFrm.ShowDialog();
        }
Exemplo n.º 2
0
        private void dgvDataSource_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (DataGridViewActionButtonCell.IsModifyButtonClick(sender, e))
            {
                string objectId = dgvDataSource["ColAction", e.RowIndex].Value.ToString(); // 获取所要修改关联对象的主键
                DASP.Domain.Entitys.TBTunnelEntity entity = tunnelManager.Get(Guid.Parse(objectId));
                EditTunnelFrm editFrm = new EditTunnelFrm(entity);
                editFrm.FormClosed += new FormClosedEventHandler(editFrm_FormClosed);
                editFrm.ShowDialog();
            }

            if (DataGridViewActionButtonCell.IsDeleteButtonClick(sender, e))
            {
                string objectId = dgvDataSource["ColAction", e.RowIndex].Value.ToString(); // 获取所要删除关联对象的主键
            }
        }