Esempio n. 1
0
        void _MainWork_DoWork(object sender, DoWorkEventArgs e)
        {
            YunZhiService service = null;

            try
            {
                service = new YunZhiService();
                if (e.Argument != null)
                {
                    string method = e.Argument.ToString();
                    switch (method.ToLower())
                    {
                    case "getpartientlist":
                        e.Result = new object[] { method.ToLower(), service.QueryProjectList(this._StartDate.ToString("yyyy-MM-dd 00:00:00"), this._EndDate.ToString("yyyy-MM-dd 23:59:59"), SourceHelper.EmployeeInfo.HID, this._patientName) };
                        break;

                    case "getpatientinfo":
                        e.Result = new object[] { method.ToLower(), service.GetProjectListAndPatientInfo(this._curEID, SourceHelper.EmployeeInfo.HID, this._StartDate.ToString("yyyy-MM-dd 00:00:00"), this._EndDate.ToString("yyyy-MM-dd 23:59:59")) };
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Log.Error("获取诊疗记录异常:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }
Esempio n. 2
0
        private void SaveOption()
        {
            YunZhiService service = null;

            try
            {
                string userName = this.txtUserName.Text.Trim();
                if (string.IsNullOrEmpty(userName))
                {
                    MessageBox.Show("请输入姓名!");
                    return;
                }
                string idcard = this.txt_IDCard.Text.Trim();
                if (string.IsNullOrEmpty(idcard))
                {
                    //TODO Services
                    MessageBox.Show("请输入身份证号!"); //不输入身份证号,服务端保存失败,返回的msg=""
                    return;
                }

                string   sex        = this.cbBox_Sex.SelectedIndex.ToString();
                DateTime birthday   = this.dtp_Birthday.Value;
                string   tel        = this.txt_Tel.Text.Trim();
                string   address    = this.txt_Address.Text.Trim();
                string   addressNew = this.txt_AddressNew.Text.Trim();
                service = new YunZhiService();
                YunZhiResult addResult = service.AddPatientInfo(userName, address, tel, birthday.ToString("yyyy-MM-dd hh:mm:ss"), sex, idcard, addressNew, SourceHelper.EmployeeInfo.HID, SourceHelper.EmployeeInfo.EmpID);
                if (addResult.Result == 1)
                {
                    MessageBox.Show("添加成功");
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    string strMessgage = string.IsNullOrEmpty(addResult.Msg) ? "添加失败" : addResult.Msg;
                    MessageBox.Show(strMessgage);
                }
            }
            catch (Exception ex)
            {
                Logger.Log.Error("添加异常:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 异步开始调用服务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _bgWork_DoWork(object sender, DoWorkEventArgs e)
        {
            YunZhiService service = null;

            try
            {
                service = new YunZhiService();
                if (e.Argument != null)
                {
                    string method = e.Argument.ToString();
                    switch (method.ToLower())
                    {
                    case "getrecordlist":
                        e.Result = new object[] { method.ToLower(), service.GetHealthy_RecordListByDocId(SourceHelper.EmployeeInfo.EmpID) };
                        break;

                    case "getpatientinfo":
                        if (string.IsNullOrEmpty(this._patientID))
                        {
                            e.Result = null;
                        }
                        else
                        {
                            e.Result = new object[] { method.ToLower(), service.GetZhenLiaoListByPTID(this._patientID, SourceHelper.EmployeeInfo.HID, this._hrid) };
                        }
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Log.Error("获取诊疗记录异常:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }
Esempio n. 4
0
        void _MainWork_DoWork(object sender, DoWorkEventArgs e)
        {
            YunZhiService service = null;

            try
            {
                service  = new YunZhiService();
                e.Result = service.GetZhenLiaoListByPTID(this._PID, this._HID, this._HRID);
            }
            catch (Exception ex)
            {
                Logger.Log.Error("获取诊疗详情错误:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }
Esempio n. 5
0
        void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            YunZhiService service = new YunZhiService();

            try
            {
                YunZhiResult loginResult = service.UserLogin(this.TxtTel, this.TxtPwd);
                e.Result = loginResult;
            }
            catch (Exception ex)
            {
                Logger.Log.Error("登录异常:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }
Esempio n. 6
0
        void _mainBgWork_DoWork(object sender, DoWorkEventArgs e)
        {
            YunZhiService service = null;

            try
            {
                service = new YunZhiService();
                YunZhiResult result = service.QueryZhenLiaoList(this._StartDate.ToString("yyyy-MM-dd 00:00:00"), this._EndDate.ToString("yyyy-MM-dd 23:59:59"), SourceHelper.EmployeeInfo.HID, this._PatientName);
                e.Result = result;
            }
            catch (Exception ex)
            {
                Logger.Log.Error("获取档案信息异常:" + ex.Message, ex);
            }
            finally
            {
                if (service != null)
                {
                    service.Abort();
                }
            }
        }