/// <summary> /// 删除主记录 /// </summary> protected override void m_mthDelete() { if (m_objCurrentBaseVO == null) { return; } if (m_dtbRecords.Rows.Count > 0) { clsPublicFunction.ShowInformationMessageBox("已记录催产素静脉点滴情况,此记录不允许删除!"); return; } MainServ::clsEMR_OXTIntravenousDripMainService objServ = (MainServ::clsEMR_OXTIntravenousDripMainService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(MainServ::clsEMR_OXTIntravenousDripMainService)); long lngRes = objServ.m_lngDeleteBase2DB(m_objCurrentBaseVO); if (lngRes > 0) { clsPublicFunction.ShowInformationMessageBox("删除成功!"); m_mthClearMainInfo(); } else { clsPublicFunction.ShowInformationMessageBox("删除失败!"); } }
/// <summary> /// 保存主记录至数据库 /// </summary> protected override void m_mthSave() { clsEMR_OXTIntravenousDrip_BASE objBaseInfo = new clsEMR_OXTIntravenousDrip_BASE(); objBaseInfo.m_strLAYCOUNT_CHR = m_txtGravidity.Text; objBaseInfo.m_strLAYCOUNT_CHRXML = m_txtGravidity.m_strGetXmlText(); objBaseInfo.m_strGESTATIONALPERIOD = m_txtGestationalPeriod.Text; objBaseInfo.m_strGESTATIONALPERIODXML = m_txtGestationalPeriod.m_strGetXmlText(); objBaseInfo.m_strBISHOPCOUNT = m_txtBiShopCount.Text; objBaseInfo.m_strBISHOPCOUNTXML = m_txtBiShopCount.m_strGetXmlText(); objBaseInfo.m_strBISHOP0 = m_strNum(m_chkBiShop00.Checked) + m_strNum(m_chkBiShop10.Checked) + m_strNum(m_chkBiShop20.Checked) + m_strNum(m_chkBiShop30.Checked); objBaseInfo.m_strBISHOP1 = m_strNum(m_chkBiShop01.Checked) + m_strNum(m_chkBiShop11.Checked) + m_strNum(m_chkBiShop21.Checked) + m_strNum(m_chkBiShop31.Checked); objBaseInfo.m_strBISHOP2 = m_strNum(m_chkBiShop02.Checked) + m_strNum(m_chkBiShop12.Checked) + m_strNum(m_chkBiShop22.Checked) + m_strNum(m_chkBiShop32.Checked); objBaseInfo.m_strBISHOP3 = m_strNum(m_chkBiShop03.Checked) + m_strNum(m_chkBiShop13.Checked) + m_strNum(m_chkBiShop23.Checked); objBaseInfo.m_strBISHOP4 = m_strNum(m_chkBiShop04.Checked) + m_strNum(m_chkBiShop14.Checked) + m_strNum(m_chkBiShop24.Checked); objBaseInfo.m_strOXTINTRAVENOUSDRIPINFO = m_txtOXTIntravenousDripInfo.Text; objBaseInfo.m_strOXTINTRAVENOUSDRIPINFOXML = m_txtOXTIntravenousDripInfo.m_strGetXmlText(); objBaseInfo.m_strOXTINDICATION = m_txtOXTIndication.Text; objBaseInfo.m_strOXTINDICATIONXML = m_txtOXTIndication.m_strGetXmlText(); objBaseInfo.m_strOXTALL = m_txtOXTAll.Text; objBaseInfo.m_strOXTALLXML = m_txtOXTAll.m_strGetXmlText(); string strNow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); objBaseInfo.m_strRegisterID = m_objCurrentPatient.m_StrRegisterId; objBaseInfo.m_dtmModifyDate = Convert.ToDateTime(strNow); objBaseInfo.m_strModifyUserID = clsEMRLogin.LoginInfo.m_strEmpNo; long lngRes = 0; MainServ::clsEMR_OXTIntravenousDripMainService objServ = (MainServ::clsEMR_OXTIntravenousDripMainService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(MainServ::clsEMR_OXTIntravenousDripMainService)); if (m_objCurrentBaseVO == null) { objBaseInfo.m_dtmCreateDate = Convert.ToDateTime(strNow); objBaseInfo.m_strCreateUserID = clsEMRLogin.LoginInfo.m_strEmpNo; lngRes = objServ.m_lngAddNewBase2DB(objBaseInfo); } else { lngRes = objServ.m_lngModifyBase2DB(objBaseInfo); } if (lngRes > 0) { clsPublicFunction.ShowInformationMessageBox("保存成功!"); m_objCurrentBaseVO = objBaseInfo; m_mthSetBaseInfoToUI(); m_mthAddFormStatusForClosingSave(); } else { clsPublicFunction.ShowInformationMessageBox("保存失败!"); } }