Esempio n. 1
0
        /// <summary>
        /// Print
        /// </summary>
        internal void Print()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo != null && Function.Dec(vo.rptId) > 0)
            {
                frmPrintDocumentSimple frm = new frmPrintDocumentSimple(GetXR(Function.Dec(vo.rptId)));
                frm.ShowDialog();
            }
        }
Esempio n. 2
0
        public frmInterviewEdit(EntityOutpatientInterview _entityInterview)
        {
            InitializeComponent();

            if (!DesignMode)
            {
                this.defaultLookAndFeel.LookAndFeel.SkinName = GlobalLogin.SkinName;
                DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(GlobalLogin.SkinName);
                ((ctlinterviewedit)Controller).InterviewVo = _entityInterview;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// NewEvent
        /// </summary>
        internal void NewEvent()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo != null)
            {
                this.PopupForm(vo);
            }
            else
            {
                return;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// EditEvent
        /// </summary>
        internal void EditInterview()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo.rptId > 0)
            {
                if (vo != null)
                {
                    this.PopupForm(vo);
                }
            }
            else
            {
                this.NewEvent();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Export
        /// </summary>
        internal void Export()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo != null && Function.Dec(vo.rptId) > 0)
            {
                XtraReport xr = GetXR(Function.Dec(vo.rptId));
                if (xr != null && xr.DataSource != null)
                {
                    xr.Name = Viewer.Text;
                    uiHelper.Export(xr);
                }
            }

            uiHelper.ExportToXls(Viewer.gvReport);
        }
Esempio n. 6
0
        /// <summary>
        /// PopupForm
        /// </summary>
        /// <param name="vo"></param>
        void PopupForm(EntityOutpatientInterview vo)
        {
            if (vo == null)
            {
                vo       = new EntityOutpatientInterview();
                vo.isNew = true;
            }

            frmInterviewEdit frm = new frmInterviewEdit(vo);

            frm.Text = Viewer.Text;

            frm.ShowDialog();
            if (frm.IsSave)
            {
                this.Query();
            }
        }
Esempio n. 7
0
        /// <summary>
        /// DelEvent
        /// </summary>
        internal void DelInterview()
        {
            EntityOutpatientInterview vo = GetRowObject();

            if (vo != null && Function.Dec(vo.rptId) > 0)
            {
                if (DialogBox.Msg("确定是否删除当前记录??", MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                    {
                        if (proxy.Service.DelInterview(Function.Dec(vo.rptId)) > 0)
                        {
                            DialogBox.Msg("删除记录成功!");
                            this.Query();
                        }
                        else
                        {
                            DialogBox.Msg("删除记录失败。");
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        /// <summary>
        /// Save
        /// </summary>
        internal void Save()
        {
            if (Viewer.txtPatName.Tag == null)
            {
                DialogBox.Msg("请先调出患者信息。");
                return;
            }
            EntityPatientInfo patVo = Viewer.txtPatName.Tag as EntityPatientInfo;

            try
            {
                uiHelper.BeginLoading(Viewer);
                string   fieldName           = string.Empty;
                DateTime dtmNow              = Utils.ServerTime();
                EntityOutpatientInterview vo = new EntityOutpatientInterview();
                vo.rptId    = Function.Dec(this.InterviewVo.rptId);
                vo.patName  = patVo.name;
                vo.patSex   = patVo.sex;
                vo.patNo    = patVo.ipNo;
                vo.birthday = patVo.birth;
                vo.idCard   = patVo.ID;
                //vo.contactAddr = patVo.addr;
                //vo.contactTel = patVo.contTel;
                vo.outDeptCode     = patVo.deptCode;
                vo.outHospitalTime = Function.Datetime(patVo.outDate).ToString("yyyy-MM-dd HH:mm");
                if (!string.IsNullOrEmpty(patVo.birth))
                {
                    vo.birthday = patVo.birth;
                }
                vo.contactTel    = patVo.contTel;
                vo.xmlData       = Viewer.showPanelForm.XmlData();
                vo.recordDate    = dtmNow.ToString("yyyy-MM-dd HH:mm:ss");
                vo.interviewTime = this.InterviewVo.interviewTime;
                vo.registerid    = this.InterviewVo.registerid;
                vo.status        = 1;

                // 随访人
                if (InterviewParmData.Any(t => t.keyId == "interviewCode"))
                {
                    fieldName = InterviewParmData.FirstOrDefault(t => t.keyId == "interviewCode").keyValue;
                    fieldName = InterviewParmData.FirstOrDefault(t => t.keyId == "interviewCode").keyValue;
                    string interviewName = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (GlobalDic.DataSourceEmployee.Any(t => t.operName == interviewName))
                    {
                        vo.interviewCode = GlobalDic.DataSourceEmployee.FirstOrDefault(t => t.operName == interviewName).operCode;
                    }
                    else
                    {
                        vo.interviewCode = GlobalLogin.objLogin.EmpNo;
                    }
                }
                else
                {
                    vo.interviewCode = GlobalLogin.objLogin.EmpNo;
                }

                // 随访时间
                if (InterviewParmData.Any(t => t.keyId == "interviewTime"))
                {
                    string interviewTime = string.Empty;
                    fieldName     = InterviewParmData.FirstOrDefault(t => t.keyId == "interviewTime").keyValue;
                    interviewTime = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (string.IsNullOrEmpty(interviewTime) && string.IsNullOrEmpty(vo.interviewTime))
                    {
                        vo.interviewTime = dtmNow.ToString("yyyy-MM-dd HH:mm");
                    }
                }
                else
                {
                    vo.interviewTime = dtmNow.ToString("yyyy-MM-dd HH:mm");
                }

                // 现住地址
                if (InterviewParmData.Any(t => t.keyId == "contactAddr"))
                {
                    string contactAddr = string.Empty;
                    fieldName   = InterviewParmData.FirstOrDefault(t => t.keyId == "contactAddr").keyValue;
                    contactAddr = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (!string.IsNullOrEmpty(contactAddr))
                    {
                        vo.contactAddr = contactAddr;
                    }
                }

                // 联系电话
                if (InterviewParmData.Any(t => t.keyId == "contactTel"))
                {
                    string contactTel = string.Empty;
                    fieldName  = InterviewParmData.FirstOrDefault(t => t.keyId == "contactTel").keyValue;
                    contactTel = Viewer.showPanelForm.GetItemInfo(fieldName);
                    if (!string.IsNullOrEmpty(contactTel))
                    {
                        vo.contactTel = contactTel;
                    }
                }

                using (ProxyAdverseEvent proxy = new ProxyAdverseEvent())
                {
                    if (proxy.Service.SaveInterview(ref vo) > 0)
                    {
                        Viewer.IsSave = true;
                        Viewer.txtCardNo.Properties.ReadOnly = true;
                        this.InterviewVo.rptId = vo.rptId;
                        DialogBox.Msg("数据保存成功!");
                    }
                    else
                    {
                        DialogBox.Msg("数据保存失败。");
                    }
                }
            }
            finally
            {
                uiHelper.CloseLoading(Viewer);
            }
        }