Beispiel #1
0
        private void m_cboTypeName_SelectedIndexChanged(object sender, EventArgs e)
        {
            clsPatientType_VO patientType = m_cboTypeName.SelectedItem as clsPatientType_VO;

            if (patientType != null)
            {
                this.m_txtTypeId.Text = patientType.m_strPayTypeID;
            }
        }
Beispiel #2
0
        private clsPatientType_VO ConstructVO(DataRow dtRow)
        {
            clsPatientType_VO patientType = new clsPatientType_VO();

            patientType.m_strPayTypeID   = dtRow["paytypeid_chr"].ToString();
            patientType.m_strPayTypeName = dtRow["paytypename_vchr"].ToString();

            return(patientType);
        }
Beispiel #3
0
 private void SelectedTypeNameIndex(string payTypeId)
 {
     foreach (object obj in m_cboTypeName.Items)
     {
         clsPatientType_VO payTypeVO = obj as clsPatientType_VO;
         if (payTypeVO != null && payTypeVO.m_strPayTypeID == payTypeId)
         {
             m_cboTypeName.SelectedItem = obj;
             break;
         }
     }
 }
Beispiel #4
0
        /// <summary>
        /// 查找病人类型
        /// </summary>
        public long m_lngGetPatType(out clsPatientType_VO[] p_objResultArr)
        {
            long lngRes = 0;

            System.Security.Principal.IPrincipal p_objPrincipal = null;
            p_objResultArr = new clsPatientType_VO[0];
            //			System.Security.Principal.IPrincipal p_objPrincipal = null;
            com.digitalwave.iCare.middletier.HIS.clsRegisterSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsRegisterSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsRegisterSvc));
            lngRes = objSvc.m_lngGetPatType(p_objPrincipal, out p_objResultArr);
            objSvc.Dispose();
            objSvc = null;

            return(lngRes);
        }
Beispiel #5
0
        /// <summary>
        /// 加载患者身份类型

        /// </summary>
        private void m_mthLoadYBTypeList()
        {
            clsPatientType_VO[] arrPatientPayTypes = null;
            clsDcl_PatientPayTypeSmp.s_object.m_lngGetYBPatientPayType(out arrPatientPayTypes);
            if (arrPatientPayTypes == null)
            {
                arrPatientPayTypes = new clsPatientType_VO[0];
            }

            m_cboTypeName.Items.Clear();
            foreach (clsPatientType_VO payTypeVO in arrPatientPayTypes)
            {
                this.m_cboTypeName.Items.Add(payTypeVO);
            }
            m_cboTypeName.Tag = arrPatientPayTypes;
        }
Beispiel #6
0
        private clsPatientType_VO[] ConstructArrayVO(DataTable table)
        {
            if (IsTableNull(table))
            {
                return(new clsPatientType_VO[0]);
            }

            int rowCount = table.Rows.Count;

            clsPatientType_VO[] arrPatientType = new clsPatientType_VO[rowCount];
            for (int i = 0; i < rowCount; i++)
            {
                arrPatientType[i] = ConstructVO(table.Rows[i]);
            }

            return(arrPatientType);
        }
Beispiel #7
0
        public long m_lngGetYBPatientPayType(out clsPatientType_VO[] arrPatientType)
        {
            long      lngRes = 0;
            DataTable table  = null;

            arrPatientType = null;

            string sql = @"
                               select paytypeid_chr, 
                                      paytypename_vchr
                                 from t_bse_patientpaytype
                                where (internalflag_int = 1 or internalflag_int = 2)
                          ";

            try
            {
                clsHRPTableService hrpService = new clsHRPTableService();
                lngRes = hrpService.lngGetDataTableWithoutParameters(sql, ref table);

                if (IsTableNull(table))
                {
                    arrPatientType = null;
                }
                else
                {
                    //arrPatientType = ConstructArrayVO(table);
                    int intRow = table.Rows.Count;
                    arrPatientType = new clsPatientType_VO[intRow];

                    DataRow dtRow = null;
                    for (int i1 = 0; i1 < intRow; i1++)
                    {
                        dtRow = table.Rows[i1];
                        arrPatientType[i1] = new clsPatientType_VO();
                        arrPatientType[i1].m_strPayTypeID   = dtRow["paytypeid_chr"].ToString();
                        arrPatientType[i1].m_strPayTypeName = dtRow["paytypename_vchr"].ToString();
                    }
                }
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #8
0
        /// <summary>
        /// 获取患者类型


        /// </summary>
        /// <param name="patientPayTypeId"></param>
        /// <param name="patientType"></param>
        /// <returns></returns>
        public long m_lngGetPatientPayType(string patientPayTypeId, out clsPatientType_VO patientType)
        {
            long lngRes = 0;

            patientType = null;

            try
            {
                com.digitalwave.iCare.middletier.HIS.clsPatientPayTypeSvc kk =
                    (com.digitalwave.iCare.middletier.HIS.clsPatientPayTypeSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsPatientPayTypeSvc));
                lngRes = kk.m_lngGetPatientPayType(patientPayTypeId, out patientType);
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #9
0
        public long m_lngGetPatientPayType(string patientPayTypeId, out clsPatientType_VO patientType)
        {
            long      lngRes = 0;
            DataTable table  = null;

            patientType = null;

            string sql = @" select paytypeid_chr, paytypename_vchr
                              from t_bse_patientpaytype
                             where (internalflag_int = 1 or internalflag_int = 2)
                               and paytypeid_chr = ?
                          ";

            try
            {
                clsHRPTableService hrpService = new clsHRPTableService();
                IDataParameter[]   objParams  = null;
                hrpService.CreateDatabaseParameter(1, out objParams);
                objParams[0].Value = patientPayTypeId;

                lngRes = hrpService.lngGetDataTableWithParameters(sql, ref table, objParams);

                if (IsTableNull(table))
                {
                    patientType = null;
                }
                else
                {
                    patientType = ConstructVO(table.Rows[0]);
                }
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #10
0
        //保存
        private void m_cmdSave_Click(object sender, EventArgs e)
        {
            if (m_lsvYBPayTypes.FocusedItem == null && !this.m_blnNewYBDefPayTypes)
            {
                return;
            }

            Cursor.Current         = Cursors.WaitCursor;
            this.m_cmdSave.Enabled = false;

            if (this.m_blnNewYBDefPayTypes)
            {//新增的保存
                clsYBDefPayTypeVO ybDefPayTypeVO = new clsYBDefPayTypeVO();

                clsPatientType_VO patientPayType = this.m_cboTypeName.SelectedItem as clsPatientType_VO;
                if (patientPayType == null)
                {
                    MessageBox.Show("请选择患者身份类型!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                ybDefPayTypeVO.m_strPayTypeId   = patientPayType.m_strPayTypeID;
                ybDefPayTypeVO.m_strYBJslx      = GetJslxId(this.m_cboYBJslxName.SelectedIndex);
                ybDefPayTypeVO.m_strYBRylb      = GetRylxId(this.m_cboYBRylxName.SelectedIndex);
                ybDefPayTypeVO.m_strPayTypeName = patientPayType.m_strPayTypeName;

                clsYBDefPayTypeVO temp = null;
                clsDcl_YBDefPayTypeSmp.s_object.m_lngFind(ybDefPayTypeVO.m_strPayTypeId, out temp);
                if (temp != null)
                {
                    MessageBox.Show("该患者身份类型已经添加!", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                long lngRes = clsDcl_YBDefPayTypeSmp.s_object.m_lngInsert(ybDefPayTypeVO);
                if (lngRes > 0)
                {//成功
                 //更新状态标志


                    this.m_blnNewYBDefPayTypes = false;
                    //加入到集合


                    clsYBDefPayTypeVO[] objGroupArr    = (clsYBDefPayTypeVO[])this.m_lsvYBPayTypes.Tag;
                    clsYBDefPayTypeVO[] objGroupNewArr = new clsYBDefPayTypeVO[objGroupArr.Length + 1];
                    objGroupArr.CopyTo(objGroupNewArr, 0);
                    objGroupNewArr[objGroupNewArr.Length - 1] = ybDefPayTypeVO;
                    this.m_lsvYBPayTypes.Tag = objGroupNewArr;

                    //添加新项
                    ListViewItem item = new ListViewItem(ybDefPayTypeVO.m_strPayTypeId);
                    item.SubItems.Add(ybDefPayTypeVO.m_strPayTypeName);
                    item.SubItems.Add(ybDefPayTypeVO.m_strYBJslxName());
                    item.SubItems.Add(ybDefPayTypeVO.m_strYBRylbName());
                    item.Tag = ybDefPayTypeVO;

                    this.m_lsvYBPayTypes.Items.Add(item);

                    item.Selected            = true;
                    item.Focused             = true;
                    this.m_txtTypeId.Enabled = false;
                    this.m_lsvYBPayTypes_Click(null, null);
                }
                else
                {//失败
                    MessageBox.Show("新增数据失败!");
                }
            }
            else
            {//修改的保存
                clsPatientType_VO patientPayType = this.m_cboTypeName.SelectedItem as clsPatientType_VO;
                if (patientPayType == null)
                {
                    MessageBox.Show("请选择患者身份类型!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                clsYBDefPayTypeVO objYBDefPayType = (clsYBDefPayTypeVO)this.m_lsvYBPayTypes.FocusedItem.Tag;

                clsYBDefPayTypeVO objGroup = new clsYBDefPayTypeVO();
                objYBDefPayType.m_mthCopyTo(objGroup);

                objYBDefPayType.m_strPayTypeName = patientPayType.m_strPayTypeName;
                objYBDefPayType.m_strYBJslx      = GetJslxId(this.m_cboYBJslxName.SelectedIndex);
                objYBDefPayType.m_strYBRylb      = GetRylxId(this.m_cboYBRylxName.SelectedIndex);

                long lngRes = clsDcl_YBDefPayTypeSmp.s_object.m_lngUpdate(objYBDefPayType);

                if (lngRes > 0)
                {//成功
                    //objGroup.m_mthCopyTo(objYBDefPayType);
                    this.m_lsvYBPayTypes.FocusedItem.Text             = objYBDefPayType.m_strPayTypeId;
                    this.m_lsvYBPayTypes.FocusedItem.SubItems[1].Text = objYBDefPayType.m_strPayTypeName;
                    this.m_lsvYBPayTypes.FocusedItem.SubItems[2].Text = objYBDefPayType.m_strYBJslxName();
                    this.m_lsvYBPayTypes.FocusedItem.SubItems[3].Text = objYBDefPayType.m_strYBRylbName();
                    m_lsvYBPayTypes.Tag = objYBDefPayType;
                }
                else
                {//失败
                    MessageBox.Show("修改数据失败!");
                }
                this.m_txtTypeId.Enabled = false;
            }
            this.m_cmdSave.Enabled = true;
            Cursor.Current         = Cursors.Default;
        }