void DisplayManager_PositionChanged(object sender, EventArgs e) { if (m_cm.DisplayManager.Position == -1) { MyGrid.CancelEditCurrentDataRow(m_显示区Grid); m_显示区Grid.DataRows.Clear(); } else { m_显示区Grid.ReloadData(false); } var entity = m_cm.DisplayManagerT.CurrentEntity; if (entity == null) { return; } if (entity.IsActive) { btn删除.Enabled = false; btn修改.Enabled = false; } else { btn删除.Enabled = true; btn修改.Enabled = true; } }
void DisplayManager_PositionChanged(object sender, EventArgs e) { if (m_cm.DisplayManager.Position == -1) { MyGrid.CancelEditCurrentDataRow(m_显示区Grid); m_显示区Grid.DataRows.Clear(); } else { m_显示区Grid.ReloadData(false); } var entity = m_cm.DisplayManagerT.CurrentEntity; if (entity == null) { return; } bool ret = true; if (entity.任务 != null) { foreach (var i in entity.任务) { if (!string.IsNullOrEmpty(i.任务号) || i.是否拒绝) { ret = false; } } } else { ret = false; } btn修改.Enabled = ret; btn拒绝.Enabled = ret; btn备案确认.Enabled = ret; }
public void RefreshData() { m_暂存区Grid.ReloadData(); }