public virtual void save()
        {
            Neusoft.FrameWork.WinForms.Forms.frmWait frmWait = new Neusoft.FrameWork.WinForms.Forms.frmWait();
            frmWait.Text = "保存中,请稍后……";
            frmWait.Show();
            if (!this.InputValid())
            {
                return;
            }
            #region 设置事物

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            this.feeIntegrate.SetTrans(Neusoft.FrameWork.Management.PublicTrans.Trans);
            #endregion

            //住院证实体
            Neusoft.HISFC.Models.RADT.InPatientProof inpatientproof = this.GetInPatientProofInfo();
            if (inpatientproof == null)
            {
                MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("住院证信息不能为空"));
                return;
            }

            int returnValue = 0;

            returnValue = this.radtIntegrate.InPatientProof(inpatientproof);
            if (returnValue < 0)
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("更新住院证信息失败!\n" + this.regMgr.Err);
                return;
            }

            Neusoft.FrameWork.Management.PublicTrans.Commit();
            #region 住院证打印
            if (string.IsNullOrEmpty(inpatientproof.Clinic_code))
            {
                MessageBox.Show("取住院证实体信息失败!\n" + this.regMgr.Err);
                return;
            }
            else
            {
                this.inpatientproofPrint = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.FeeInterface.IInpatientProofPrint)) as Neusoft.HISFC.BizProcess.Interface.FeeInterface.IInpatientProofPrint;

                if (this.inpatientproofPrint == null)
                {
                }
                else
                {
                    this.inpatientproofPrint.Clear();
                    this.inpatientproofPrint.SetValue(this.inpatientproof);
                    this.inpatientproofPrint.Print();
                }
            }
            #endregion
            frmWait.Close();
            MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("保存数据成功!"), Neusoft.FrameWork.Management.Language.Msg("提示"), MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Clear();
        }
 /// <summary>
 /// 显示数据
 /// </summary>
 /// <param name="register"></param>
 public void setInfo(Neusoft.HISFC.Models.Registration.Register register)
 {
     if (register == null)
     {
         MessageBox.Show("该患者无此挂号信息!");
     }
     else
     {
         this.Clear();
         this.inpatientproofinfo = this.radtIntegrate.QueryInPatientProofinfo(register.ID);
         if (string.IsNullOrEmpty(inpatientproofinfo.Clinic_code)) //新增加
         {
             this.patientInfo = this.radtIntegrate.QueryComPatientInfo(register.PID.CardNO);
             this.cardNO      = this.patientInfo.PID.CardNO;
             SetPatient(register);
         }
         else //修改住院证信息
         {
             SetInPatientProof(inpatientproofinfo);
         }
         this.cmbDept.Focus();
     }
 }
        /// <summary>
        /// 获取住院证实体
        /// </summary>
        /// <returns></returns>
        private Neusoft.HISFC.Models.RADT.InPatientProof GetInPatientProofInfo()
        {
            inpatientproof = new Neusoft.HISFC.Models.RADT.InPatientProof();
            //InPatientProof.PID.CardNO = cardNO;
            inpatientproof.Card_no        = this.txtCARDNO.Text;                 //门诊卡号
            inpatientproof.Clinic_code    = this.txtCLINIC.Text;                 //门诊流水号
            inpatientproof.Name           = this.txtName.Text;                   //姓名
            inpatientproof.Idenno         = this.txtIDNO.Text;                   //身份证
            inpatientproof.Sex_code.ID    = this.cmbSex.Tag.ToString();          //性别
            inpatientproof.Birthday       = this.dtpBirthDay.Value;              //出生日期
            inpatientproof.Age            = this.txtAge.Text;                    //年龄
            inpatientproof.Dept_code.ID   = this.cmbDept.Tag.ToString();         //科室
            inpatientproof.Dept_code.Name = this.cmbDept.Text.ToString();        //科室名称
            inpatientproof.Room           = string.Empty;                        //病室
            inpatientproof.Diagnose       = this.txtInDiagnosis.Text;            //入院诊断
            inpatientproof.Address        = this.cmbHomeAddress.Text.ToString(); //地址
            inpatientproof.Intext         = this.txtINTEXT.Text;                 //内容
            if (this.CKB1.Checked == true)
            {
                inpatientproof.Wwfs = this.CKB1.Text;
            }
            if (this.CKB2.Checked == true)
            {
                inpatientproof.Wwfs = this.CKB2.Text;
            }
            if (this.CKB3.Checked == true)
            {
                inpatientproof.Is_ys = this.CKB3.Text;
            }
            if (this.CKB4.Checked == true)
            {
                inpatientproof.Is_ys = this.CKB4.Text;
            }
            if (this.CKB5.Checked == true)
            {
                inpatientproof.Is_tj = this.CKB5.Text;
            }

            if (this.CKB6.Checked == true)
            {
                inpatientproof.Is_zx = this.CKB6.Text;
            }
            if (this.CKB7.Checked == true)
            {
                inpatientproof.Is_my = this.CKB7.Text;
            }
            if (this.CKB8.Checked == true)
            {
                inpatientproof.Is_lf = this.CKB8.Text;
            }
            inpatientproof.In_date         = this.accountManager.GetDateTimeFromSysDateTime(); //开证日期
            inpatientproof.Doct_code.ID    = this.cmbDoctor.Tag.ToString();                    //医生
            inpatientproof.Doct_code.Name  = this.cmbDoctor.Text.ToString();                   //医生姓名
            inpatientproof.Inpatient_count = NConvert.ToInt32(this.neuTextBox1.Text);          //住院约计日数
            if (this.CB1.Checked == true)                                                      //是否贵重药品
            {
                inpatientproof.Is_drug = this.CB1.Text;
            }
            else if (this.CB2.Checked == true)
            {
                inpatientproof.Is_drug = this.CB2.Text;
            }
            else
            {
                inpatientproof.Is_drug = string.Empty;
            }

            if (this.CB3.Checked == true) //手术类型
            {
                inpatientproof.Ops_type = this.CB3.Text;
            }
            else if (this.CB4.Checked == true)
            {
                inpatientproof.Ops_type = this.CB4.Text;
            }
            else if (this.CB5.Checked == true)
            {
                inpatientproof.Ops_type = this.CB5.Text;
            }
            else
            {
                inpatientproof.Ops_type = string.Empty;
            }
            inpatientproof.Blood_qty = NConvert.ToInt32(neuTextBox2.Text); //输血数量

            if (this.CB6.Checked == true)                                  //X线
            {
                inpatientproof.Xxfs = this.CB6.Text;
            }
            else if (this.CB7.Checked == true)
            {
                inpatientproof.Xxfs = this.CB7.Text;
            }
            else
            {
                inpatientproof.Xxfs = string.Empty;
            }
            inpatientproof.Memo  = string.Empty;
            inpatientproof.Memo1 = string.Empty;

            return(inpatientproof);
        }
        /// <summary>
        /// 显示住院证基本信息
        /// </summary>
        ///
        private void SetInPatientProof(Neusoft.HISFC.Models.RADT.InPatientProof inpatientproof1)
        {
            if (!string.IsNullOrEmpty(inpatientproof1.Clinic_code))
            {
                this.txtCLINIC.Text    = this.inpatientproofinfo.Clinic_code;                                                  //门诊号
                this.txtCARDNO.Text    = this.inpatientproofinfo.Card_no;                                                      //卡号
                this.txtName.Text      = this.inpatientproofinfo.Name;                                                         //姓名
                this.txtIDNO.Text      = this.inpatientproofinfo.Idenno;                                                       //身份证号
                this.cmbSex.Text       = this.inpatientproofinfo.Sex_code.Name;                                                //性别
                this.cmbSex.Tag        = this.inpatientproofinfo.Sex_code.ID;                                                  //性别
                this.dtpBirthDay.Value = inpatientproofinfo.Birthday;                                                          //出生日期
                this.txtAge.Text       = Neusoft.HISFC.BizProcess.Integrate.Function.GetAge(this.inpatientproofinfo.Birthday); //年龄

                this.cmbDept.Text        = inpatientproofinfo.Dept_code.Name;                                                  //住院科室名称
                this.cmbDept.Tag         = inpatientproofinfo.Dept_code.ID;                                                    //住院科室代码
                this.txtInDiagnosis.Text = this.inpatientproofinfo.Diagnose;                                                   //诊断
                this.cmbHomeAddress.Text = this.inpatientproofinfo.Address;                                                    //家庭住址
                this.txtINTEXT.Text      = this.inpatientproofinfo.Intext;
                this.cmbDoctor.Text      = inpatientproofinfo.Doct_code.Name;                                                  //医生
                this.cmbDoctor.Tag       = inpatientproofinfo.Doct_code.ID;
                this.neuTextBox1.Text    = inpatientproofinfo.Inpatient_count.ToString();
                this.neuTextBox2.Text    = inpatientproofinfo.Blood_qty.ToString();
                if (inpatientproofinfo.Wwfs == "半卧")
                {
                    this.CKB1.Checked = true;
                }
                if (inpatientproofinfo.Wwfs == "休克卧")
                {
                    this.CKB2.Checked = true;
                }
                if (inpatientproofinfo.Is_ys == "禁食")
                {
                    this.CKB3.Checked = true;
                }
                if (inpatientproofinfo.Is_ys == "食")
                {
                    this.CKB4.Checked = true;
                }
                if (inpatientproofinfo.Is_tj == "抬架")
                {
                    this.CKB5.Checked = true;
                }
                if (inpatientproofinfo.Is_zx == "自行")
                {
                    this.CKB6.Checked = true;
                }
                if (inpatientproofinfo.Is_my == "沐浴")
                {
                    this.CKB7.Checked = true;
                }
                if (inpatientproofinfo.Is_lf == "理发")
                {
                    this.CKB8.Checked = true;
                }
                if (inpatientproofinfo.Is_drug == "用")
                {
                    this.CB1.Checked = true;
                }
                if (inpatientproofinfo.Is_drug == "不用")
                {
                    this.CB2.Checked = true;
                }
                if (inpatientproofinfo.Ops_type == "大")
                {
                    this.CB3.Checked = true;
                }
                if (inpatientproofinfo.Ops_type == "中")
                {
                    this.CB4.Checked = true;
                }
                if (inpatientproofinfo.Ops_type == "小")
                {
                    this.CB5.Checked = true;
                }
                if (inpatientproofinfo.Xxfs == "一般")
                {
                    this.CB6.Checked = true;
                }
                if (inpatientproofinfo.Xxfs == "特别")
                {
                    this.CB7.Checked = true;
                }
            }
        }
        /// <summary>
        /// 设置住院证中的数据
        /// </summary>
        /// <param name="inpatientproof">【实体】住院证信息</param>
        /// <returns></returns>
        public int SetValue(Neusoft.HISFC.Models.RADT.InPatientProof inpatientproofinfo)
        {
            if (!string.IsNullOrEmpty(inpatientproofinfo.Clinic_code))
            {
                try
                {
                    //Neusoft.HISFC.BizProcess.Integrate.Manager mgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
                    //this.neuLBTITLE.Text = mgr.GetHospitalName()+"住院证";
                    this.LBCLINC_CODE.Text = inpatientproofinfo.Clinic_code;                                                  //门诊号
                    this.LBCARD_NO.Text    = inpatientproofinfo.Card_no;                                                      //卡号
                    this.LBNAME.Text       = inpatientproofinfo.Name;                                                         //姓名
                    this.LBSEX.Text        = inpatientproofinfo.Sex_code.Name;                                                //性别
                    this.LBAGE.Text        = Neusoft.HISFC.BizProcess.Integrate.Function.GetAge(inpatientproofinfo.Birthday); //年龄
                    this.LBDEPT.Text       = inpatientproofinfo.Dept_code.Name;                                               //住院科室名称
                    //this.cmbDept.Tag = inpatientproofinfo.Dept_code.ID; //住院科室代码
                    this.LBDIOAGE.Text  = inpatientproofinfo.Diagnose;                                                        //诊断
                    this.LBADDRESS.Text = inpatientproofinfo.Address;                                                         //家庭住址
                    // this.LBINTEXT.Text = inpatientproofinfo.Intext;//紧急
                    this.LB_KZRQ.Text = inpatientproofinfo.In_date.ToString(" yyyy 年 MM 月 dd 日");                             //开证日期
                    this.LBDOCT.Text  = inpatientproofinfo.Doct_code.Name;                                                    //医生
                    //this.cmbDoctor.Tag = inpatientproofinfo.Doct_code.ID;
                    this.LBINPCOUNT.Text = inpatientproofinfo.Inpatient_count.ToString();                                     //约计天数
                    this.LBBLOOD.Text    = inpatientproofinfo.Blood_qty.ToString();                                           //输血数量
                    if (inpatientproofinfo.Wwfs == "半卧")
                    {
                        this.CKB1.Checked = true;
                    }
                    if (inpatientproofinfo.Wwfs == "休克卧")
                    {
                        this.CKB2.Checked = true;
                    }
                    if (inpatientproofinfo.Is_ys == "禁食")
                    {
                        this.CKB3.Checked = true;
                    }
                    if (inpatientproofinfo.Is_ys == "食")
                    {
                        this.CKB4.Checked = true;
                    }
                    if (inpatientproofinfo.Is_tj == "抬架")
                    {
                        this.CKB5.Checked = true;
                    }
                    if (inpatientproofinfo.Is_zx == "自行")
                    {
                        this.CKB6.Checked = true;
                    }
                    if (inpatientproofinfo.Is_my == "沐浴")
                    {
                        this.CKB7.Checked = true;
                    }
                    if (inpatientproofinfo.Is_lf == "理发")
                    {
                        this.CKB7.Checked = true;
                    }
                    if (inpatientproofinfo.Is_drug == "用")
                    {
                        this.CB1.Checked = true;
                    }
                    if (inpatientproofinfo.Is_drug == "不用")
                    {
                        this.CB2.Checked = true;
                    }
                    if (inpatientproofinfo.Ops_type == "大")
                    {
                        this.CB3.Checked = true;
                    }
                    if (inpatientproofinfo.Ops_type == "中")
                    {
                        this.CB4.Checked = true;
                    }
                    if (inpatientproofinfo.Ops_type == "小")
                    {
                        this.CB5.Checked = true;
                    }
                    if (inpatientproofinfo.Xxfs == "一般")
                    {
                        this.CB6.Checked = true;
                    }
                    if (inpatientproofinfo.Xxfs == "特别")
                    {
                        this.CB7.Checked = true;
                    }
                    //zhangyt-2011-03-01
                    if (inpatientproofinfo.Memo == "危")
                    {
                        this.dangercheck.Checked = true;
                    }
                    if (inpatientproofinfo.Memo == "急")
                    {
                        this.urgentcheck.Checked = true;
                    }
                    if (inpatientproofinfo.Memo == "一般")
                    {
                        this.generalcheck.Checked = true;
                    }

                    this.lblPacName.Text = inpatientproofinfo.Memo1;     //合同单位
                }
                catch (Exception ex)
                {
                    return(-1);
                }
                return(1);
            }
            else
            {
                return(-1);
            }
        }