/// <summary> /// 重置默认值 /// </summary> public void ResetDefault() { if (clsEMRLogin.s_FrmMDI.ActiveMdiChild != null) { Form frmParent = clsEMRLogin.s_FrmMDI.ActiveMdiChild; clsDefaultValueTool objTool = null; if (clsEMRLogin.s_FrmMDI.ActiveMdiChild is frmRecordsBase) { frmRecordsBase frmActive = (frmRecordsBase)clsEMRLogin.s_FrmMDI.ActiveMdiChild; if (frmActive.m_FrmCurrentSub != null) { objTool = new clsDefaultValueTool(frmActive.m_FrmCurrentSub, MDIParent.s_ObjCurrentPatient); frmParent = frmActive.m_FrmCurrentSub; } } else if (clsEMRLogin.s_FrmMDI.ActiveMdiChild is frmHRPBaseForm) { objTool = new clsDefaultValueTool(clsEMRLogin.s_FrmMDI.ActiveMdiChild, MDIParent.s_ObjCurrentPatient); } if (objTool != null) { if (clsPublicFunction.ShowQuestionMessageBox(frmParent, "是否重置默认值?") == DialogResult.Yes) { objTool.m_BlnReplaceDataShare = false; objTool.m_mthSetDefaultValue(); } } } }
/// <summary> /// 生成默认值 /// </summary> public void SetDefault() { if (clsEMRLogin.s_FrmMDI.ActiveMdiChild != null) { Form frmParent = clsEMRLogin.s_FrmMDI.ActiveMdiChild; clsDefaultValueTool objTool = null; if (clsEMRLogin.s_FrmMDI.ActiveMdiChild is frmRecordsBase) { frmRecordsBase frmActive = (frmRecordsBase)clsEMRLogin.s_FrmMDI.ActiveMdiChild; if (frmActive.m_FrmCurrentSub != null) { objTool = new clsDefaultValueTool(frmActive.m_FrmCurrentSub); frmParent = frmActive.m_FrmCurrentSub; } } else if (clsEMRLogin.s_FrmMDI.ActiveMdiChild is frmHRPBaseForm) { objTool = new clsDefaultValueTool(clsEMRLogin.s_FrmMDI.ActiveMdiChild, MDIParent.s_ObjCurrentPatient); } if (objTool != null) { if (clsPublicFunction.ShowQuestionMessageBox(frmParent, "注意!保存默认值后将会覆盖原来的默认值,这样可能会引起数据混乱,在未确定您所输入的默认值是否为正常的默认值时,请不要随便保存,是否继续?") == DialogResult.Yes) { objTool.m_mthSaveDefaultValue(); } } } }
private void m_cmdSetDefault_Click(object sender, EventArgs e) { clsDefaultValueTool objTool = new clsDefaultValueTool(this, MDIParent.s_ObjCurrentPatient); if (objTool != null) { if (clsPublicFunction.ShowQuestionMessageBox(this, "注意!保存默认值后将会覆盖原来的默认值,这样可能会引起数据混乱,在未确定您所输入的默认值是否为正常的默认值时,请不要随便保存,是否继续?") == DialogResult.Yes) { objTool.m_mthSaveDefaultValue(); } } }
private void m_cmdResetDefault_Click(object sender, EventArgs e) { clsDefaultValueTool objTool = new clsDefaultValueTool(this, MDIParent.s_ObjCurrentPatient); if (objTool != null) { if (clsPublicFunction.ShowQuestionMessageBox(this, "是否重置默认值?") == DialogResult.Yes) { objTool.m_BlnReplaceDataShare = false; objTool.m_mthSetDefaultValue(); } } }