/// <summary>编辑 /// /// </summary> private void DoEdit() { string strMsg = CheckSelect(EntityOperationType.修改); if (strMsg != string.Empty) { MessageBox.Show(strMsg); return; } BseProject model = objListViewMaster.SelectedObjects[0] as BseProject; if (model != null) { FrmBseProjectMasterDetailDialog frmDialog = new FrmBseProjectMasterDetailDialog(model, m_lstBseProject, m_lstBseProjectVersion, m_dsDetailGridSource); if (frmDialog.ShowDialog() == DialogResult.OK) { m_lstBseProject = frmDialog.ListBseProject; m_lstBseProjectVersion = frmDialog.ListBseProjectVersion; if (m_lstBseProject != null) { objListViewMaster.SetObjects(m_lstBseProject); objListViewMaster.Refresh(); } if (m_lstBseProjectVersion != null) { objListViewDetail.SetObjects(m_lstBseProjectVersion); objListViewDetail.Refresh(); } } } }
/// <summary>新增 /// /// </summary> private void DoNew() { FrmBseProjectMasterDetailDialog frmDialog = new FrmBseProjectMasterDetailDialog(null, m_lstBseProject, m_lstBseProjectVersion, m_dsDetailGridSource); if (frmDialog.ShowDialog() == DialogResult.OK) { m_lstBseProject = frmDialog.ListBseProject; m_lstBseProjectVersion = frmDialog.ListBseProjectVersion; if (m_lstBseProject != null) { objListViewMaster.SetObjects(m_lstBseProject); objListViewMaster.Refresh(); } if (m_lstBseProjectVersion != null) { objListViewDetail.SetObjects(m_lstBseProjectVersion); objListViewDetail.Refresh(); } } }