private void btn确定_Click(object sender, EventArgs e) { //if (m_clzy.专家任务.任务性质 == 专家任务性质.无优化I带货) //{ // foreach (任务 rw in m_clzy.专家任务.任务) // { // if (rw.任务性质 == 任务性质.出口装箱 || rw.任务性质 == 任务性质.进口拆箱) // { // rw.封志号 = txt封志号.Text.Trim(); // } // } //} if (m_cm.SaveCurrent()) { string jsybh = (string)m_cm.DisplayManager.DataControls["驾驶员编号"].SelectedDataValue; string czidh = (string)m_cm.DisplayManager.DataControls["车载Id号"].SelectedDataValue; string bz = (string)m_cm.DisplayManager.DataControls["备注"].SelectedDataValue; DateTime kssj = (DateTime)m_cm.DisplayManager.DataControls["开始时间"].SelectedDataValue; if (string.IsNullOrEmpty(jsybh)) { MessageForm.ShowWarning("请先指定驾驶员!"); return; } m_dao.开始监控(m_clzy, kssj, jsybh, czidh); this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { this.DialogResult = System.Windows.Forms.DialogResult.None; } }
/// <summary> /// btnOK_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void btnOK_Click(System.Object sender, System.EventArgs e) { if (m_cm.SaveCurrent()) { m_cm.EndEdit(true); } }
private void btn确定_Click(object sender, EventArgs e) { //switch (this.Text) //{ // case "起始地": // m_clzy.起始地时间 = (DateTime?)m_cm.DisplayManager.DataControls["途径地时间"].SelectedDataValue; // break; // case "途径地": // m_clzy.途径地时间 = (DateTime?)m_cm.DisplayManager.DataControls["途径地时间"].SelectedDataValue; // break; // case "终止地": // m_clzy.终止地时间 = (DateTime?)m_cm.DisplayManager.DataControls["途径地时间"].SelectedDataValue; // break; // default: // throw new ArgumentOutOfRangeException("实时监控经过地名时间 out of range"); //} if (m_cm.SaveCurrent()) { m_dao.更新作业监控状态2(m_clzy, (DateTime)m_cm.DisplayManager.DataControls["途径地时间"].SelectedDataValue, (string)m_cm.DisplayManager.DataControls["途径地编号"].SelectedDataValue, "结束"); this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { this.DialogResult = System.Windows.Forms.DialogResult.None; } }
private void btn确定_Click(object sender, EventArgs e) { if (m_cm.SaveCurrent()) { m_zjrw.时间要求始 = (DateTime)m_cm.DisplayManager.DataControls["时间要求始"].SelectedDataValue; m_zjrw.时间要求止 = (DateTime)m_cm.DisplayManager.DataControls["时间要求止"].SelectedDataValue; m_zjrw.区域编号 = (string)m_cm.DisplayManager.DataControls["区域编号"].SelectedDataValue; m_zjrw.缓急程度 = (int)m_cm.DisplayManager.DataControls["缓急程度"].SelectedDataValue; // 静态紧急下达 if (m_rw == null) { m_专家任务Dao.达专家任务(m_zjrw, System.DateTime.Now); } // 动态调度 else { m_zjrw = m_专家任务Dao.生成专家任务(m_zjrw, m_rw, m_xz); } } else { this.DialogResult = System.Windows.Forms.DialogResult.None; } }
private void btnOk_Click(object sender, EventArgs e) { if (m_cm.SaveCurrent()) { m_closeOk = true; } }
private void btn确定_Click(object sender, EventArgs e) { if (m_cm.SaveCurrent()) { string 处理结果 = (string)m_cm.DisplayManager.DataControls["处理结果"].SelectedDataValue; m_处理 = 1; DateTime?处理时间 = (DateTime?)m_cm.DisplayManager.DataControls["处理时间"].SelectedDataValue; m_dao.处理作业异常(m_clzy, 处理结果, 处理时间, true); this.DialogResult = System.Windows.Forms.DialogResult.OK; } }
internal static bool Save(IControlManager cm, SaveType saveType) { if (cm.State == StateType.Edit) { if (!cm.SaveCurrent()) { return(false); } } 任务 entity = cm.DisplayManager.CurrentItem as 任务; switch (saveType) { case SaveType.正式备案确认: 任务Dao.生成任务号(entity); break; case SaveType.拒绝确认: entity.是否拒绝 = true; entity.IsActive = false; entity.任务号 = null; break; default: break; } bool ret; if (cm.State == StateType.Edit) { ret = cm.EndEdit(true); } else { try { cm.Dao.Update(entity); ret = true; } catch (Exception ex) { ExceptionProcess.ProcessWithNotify(ex); ret = false; } } return(ret); }
internal static bool Save(IControlManager cm, SaveType saveType) { if (cm.State == StateType.Edit) { if (!cm.SaveCurrent()) { return false; } } 任务 entity = cm.DisplayManager.CurrentItem as 任务; switch (saveType) { case SaveType.正式备案确认: 任务Dao.生成任务号(entity); break; case SaveType.拒绝确认: entity.是否拒绝 = true; entity.IsActive = false; entity.任务号 = null; break; default: break; } bool ret; if (cm.State == StateType.Edit) { ret = cm.EndEdit(true); } else { try { cm.Dao.Update(entity); ret = true; } catch (Exception ex) { ExceptionProcess.ProcessWithNotify(ex); ret = false; } } return ret; }
private void btn确定_Click(object sender, EventArgs e) { if (m_cm.SaveCurrent()) { string jsybh = (string)m_cm.DisplayManager.DataControls["驾驶员编号"].SelectedDataValue; string czidh = (string)m_cm.DisplayManager.DataControls["车载Id号"].SelectedDataValue; DateTime kssj = (DateTime)m_cm.DisplayManager.DataControls["开始时间"].SelectedDataValue; if (string.IsNullOrEmpty(jsybh)) { MessageForm.ShowWarning("请先指定驾驶员!"); return; } m_dao.开始监控(m_clzy, kssj, jsybh, czidh); this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { this.DialogResult = System.Windows.Forms.DialogResult.None; } }
public static bool DoSaveS(IControlManager cm) { if (cm.SaveCurrent()) { return cm.EndEdit(true); } else { return false; } }