private static void 撤销专家任务下达(专家任务 entity) { if (!entity.达时间.HasValue) { return; } if (撤销Validation(entity, 撤销专家任务.撤销任务下达)) { entity.达时间 = null; m_专家任务dao.Update(entity); } }
private void btn退回_Click(object sender, EventArgs e) { 车辆作业Dao dao1 = new 车辆作业Dao(); 专家任务Dao dao2 = new 专家任务Dao(); DaoHelper.DoInRepository((rep) => { m_clzy.IsActive = false; string ly = (string)m_dm.DataControls["理由"].SelectedDataValue; m_clzy.备注 += "已退回," + (string.IsNullOrEmpty(ly) ? string.Empty : ("理由:" + ly)); dao1.Update(rep, m_clzy); m_clzy.专家任务.车辆作业 = null; //m_clzy.专家任务.是否已下达 = false; dao2.Update(rep, m_clzy.专家任务); }); }