示例#1
0
 public frmOPSApply(clsOutops_VO outopsvo)
 {
     InitializeComponent();
     objOutops = outopsvo;
 }
示例#2
0
        /// <summary>
        /// 保存
        /// </summary>
        public bool m_mthSave()
        {
            bool blnSuccess = false;

            if (billflag != 1)
            {
                return(false);
            }

            if (applyid == "")
            {
                return(false);
            }
            if (this.m_objViewer.lblRepsave.Text == "已审核")
            {
                MessageBox.Show("报告已审核,不能再修改。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return(false);
            }
            if (this.m_objViewer.txtRepOPSName.Text.Trim() == "")
            {
                MessageBox.Show("手术名称不能为空。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return(false);
            }

            if (this.m_objViewer.txtRepMaindoctor.Text.Trim() == "")
            {
                MessageBox.Show("手术者(主刀医生)不能为空。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return(false);
            }
            try
            {
                Convert.ToDateTime(this.m_objViewer.txtRepSigndate.Text.Trim());
            }
            catch (Exception)
            {
                MessageBox.Show("签名日期格式不正确。(正确例子:2006-03-29)", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                this.m_objViewer.txtRepSigndate.Focus();
                return(false);
            }
            bool blnCheck;

            blnCheck = m_blnCheckEmployeeIn(" lastname_vchr ='" + m_objViewer.txtRepMaindoctor.Text.Trim() + "'", m_objViewer.txtRepMaindoctor);
            if (!blnCheck)
            {
                return(false);
            }
            blnCheck = m_blnCheckEmployeeIn(" lastname_vchr ='" + m_objViewer.txtRepAssidoctor.Text.Trim() + "'", m_objViewer.txtRepAssidoctor);
            if (!blnCheck)
            {
                return(false);
            }
            blnCheck = m_blnCheckEmployeeIn(" lastname_vchr ='" + m_objViewer.txtRepMedtool.Text.Trim() + "'", m_objViewer.txtRepMedtool);
            if (!blnCheck)
            {
                return(false);
            }
            blnCheck = m_blnCheckEmployeeIn(" lastname_vchr ='" + m_objViewer.txtRepAnadoctor.Text.Trim() + "'", m_objViewer.txtRepAnadoctor);
            if (!blnCheck)
            {
                return(false);
            }
            blnCheck = m_blnCheckEmployeeIn(" lastname_vchr ='" + m_objViewer.txtRepDoctor.Text.Trim() + "'", m_objViewer.txtRepDoctor);
            if (!blnCheck)
            {
                return(false);
            }
            int index = this.m_objViewer.cboAnamode.SelectedIndex;

            clsOutops_VO objops_vo = new clsOutops_VO();

            objops_vo.applyid      = applyid;
            objops_vo.opsname      = this.m_objViewer.txtRepOPSName.Text.Trim();
            objops_vo.opsdate      = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            objops_vo.prediagnoses = this.m_objViewer.txtRepDiagbegin.Text.Trim();
            objops_vo.enddiagnoses = this.m_objViewer.txtRepDiagend.Text.Trim();
            //objops_vo.opsdoctor = this.m_objViewer.txtRepMaindoctor.Text.Trim();
            objops_vo.opsdoctor     = this.m_objViewer.txtRepMaindoctor.Tag.ToString().Trim();
            objops_vo.opsassistant1 = this.m_objViewer.txtRepAssidoctor.Tag.ToString().Trim();
            objops_vo.opsappliance  = this.m_objViewer.txtRepMedtool.Tag.ToString().Trim();
            objops_vo.opsanamode    = anamode[index];
            objops_vo.anaempid1     = this.m_objViewer.txtRepAnadoctor.Tag.ToString().Trim();
            objops_vo.opsresult     = this.m_objViewer.txtRepOPSStepandResult.Text.Trim();
            objops_vo.signdoctor    = this.m_objViewer.txtRepDoctor.Tag.ToString().Trim();
            objops_vo.signdate      = this.m_objViewer.txtRepSigndate.Text.Trim();

            long ret = objSvc.m_lngSaveOPS(applyid, objops_vo);

            if (ret > 0)
            {
                this.m_objViewer.lblRepsave.Text = "已保存";
                blnSuccess = true;
                MessageBox.Show("手术报告单信息保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                blnSuccess = false;
                MessageBox.Show("手术报告单信息保存失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
            return(blnSuccess);
        }