Exemplo n.º 1
0
        /// <summary>
        /// 异步获取主表内容
        /// </summary>
        private void m_mthGetMainDate()
        {
            DateTime dtmBegin = Convert.ToDateTime(Convert.ToDateTime(m_dtpSearchBeginDate.Text).ToString("yyyy-MM-dd 00:00:00"));
            DateTime dtmEnd   = Convert.ToDateTime(Convert.ToDateTime(m_dtpSearchEndDate.Text).ToString("yyyy-MM-dd 23:59:59"));

            if (dtmBegin.Date > dtmEnd)
            {
                return;
            }

            System.Collections.ArrayList arrPa = new System.Collections.ArrayList();
            arrPa.Add(dtmBegin);
            arrPa.Add(dtmEnd);
            arrPa.Add(m_strStorageID);
            arrPa.Add(m_txtMedicineName.Text.Trim());
            arrPa.Add(m_txtProviderName.Text);
            arrPa.Add(m_txtBillNumber.Text);
            if (m_cboDoseType.SelectedIndex < 0 || m_cboDoseType.SelectedIndex == 0)
            {
                arrPa.Add(0);
            }
            else
            {
                clsMS_MedicineType_VO objVo = m_cboDoseType.SelectedItem as clsMS_MedicineType_VO;
                arrPa.Add(objVo.m_strMedicineTypeID_CHR);
            }

            if (!m_bgwGetData.IsBusy)
            {
                m_bgwGetData.RunWorkerAsync(arrPa);
            }
        }
        public long m_lngGetMedicineInfo(System.Security.Principal.IPrincipal p_objPrincipal, out clsMS_MedicineType_VO[] p_objMedicineTypeArr)
        {
            p_objMedicineTypeArr = null;
            DataTable m_dtbMedicineType = new DataTable();
            long      lngRes            = 0;

            try
            {
                string strSQL = @"select t.medicinetypeid_chr    medicinetypeid,
       t.medicinetypename_vchr medicinetypename
  from t_aid_medicinetype t";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                lngRes = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref m_dtbMedicineType);
                objHRPServ.Dispose();
                objHRPServ = null;
                int currentRow = 0;
                clsMS_MedicineType_VO[] m_objMedicineTypeArr = new clsMS_MedicineType_VO[m_dtbMedicineType.Rows.Count];
                foreach (DataRow dr in m_dtbMedicineType.Rows)
                {
                    m_objMedicineTypeArr[currentRow] = new clsMS_MedicineType_VO();
                    m_objMedicineTypeArr[currentRow].m_strMedicineTypeID_CHR    = dr["MedicineTypeID"] as string;
                    m_objMedicineTypeArr[currentRow].m_strMedicineTypeName_VCHR = dr["MedicineTypeName"] as string;
                    currentRow++;
                }
                p_objMedicineTypeArr = m_objMedicineTypeArr;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Exemplo n.º 3
0
        public long m_lngGetStorageMedicineType(out clsMS_MedicineType_VO[] objMTVO)
        {
            objMTVO = new clsMS_MedicineType_VO[0];
            long lngRes = 0;

            System.Security.Principal.IPrincipal objPrincipal = null;
            com.digitalwave.iCare.middletier.HIS.clsGetStoreCheckMedicine_Supported_SVC objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsGetStoreCheckMedicine_Supported_SVC)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsGetStoreCheckMedicine_Supported_SVC));
            lngRes = objSvc.m_lngGetStorageMedicineType(objPrincipal, out objMTVO);

            return(lngRes);
        }
        public long m_lngGetMedStoreSetCheck(System.Security.Principal.IPrincipal p_objPrincipal, string p_strStoreRoomID, out clsMS_MedicineType_VO[] p_objType)
        {
            p_objType = null;

            long lngRes = 0;

            try
            {
                string strSQL = @"select b.medicinetypeid_chr, b.medicinetypename_vchr
  from t_ds_medstoreset a, t_aid_medicinetype b
 where a.medicinetypeid_chr = b.medicinetypeid_chr
   and a.medstoreid = ?";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                IDataParameter[]   objDPArr   = null;
                objHRPServ.CreateDatabaseParameter(1, out objDPArr);
                objDPArr[0].Value = p_strStoreRoomID;
                DataTable dtbValue = null;

                lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr);
                objHRPServ.Dispose();
                objHRPServ = null;
                if (lngRes > 0 && dtbValue != null)
                {
                    int intRowsCount = dtbValue.Rows.Count;
                    if (intRowsCount == 0)
                    {
                        return(0);
                    }

                    p_objType = new clsMS_MedicineType_VO[intRowsCount];
                    DataRow drTemp = null;
                    for (int iRow = 0; iRow < intRowsCount; iRow++)
                    {
                        p_objType[iRow] = new clsMS_MedicineType_VO();
                        drTemp          = dtbValue.Rows[iRow];
                        p_objType[iRow].m_strMedicineTypeID_CHR    = drTemp["medicinetypeid_chr"].ToString();
                        p_objType[iRow].m_strMedicineTypeName_VCHR = drTemp["medicinetypename_vchr"].ToString();
                    }
                }
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 设置药品类型
        /// </summary>
        /// <param name="p_objMPVO"></param>
        internal void m_mthSetMedicineType(clsMS_MedicineType_VO[] p_objMPVO)
        {
            if (p_objMPVO == null || m_objViewer.m_cboDoseType.Items.Count > 0)
            {
                return;
            }

            clsMS_MedicineType_VO objAll = new clsMS_MedicineType_VO();

            objAll.m_strMedicineTypeID_CHR    = "0";
            objAll.m_strMedicineTypeName_VCHR = "全部";

            m_objViewer.m_cboDoseType.Items.Add(objAll);
            m_objViewer.m_cboDoseType.Items.AddRange(p_objMPVO);

            m_objViewer.m_cboDoseType.SelectedIndex = 0;
        }
Exemplo n.º 6
0
        /// <summary>
        /// 获取新购药品明细数据
        /// 实现统计查询和明细查询功能。
        /// 可按药品的助记码、拼音码、五笔码、药品的ID或药品名称进行模糊查询
        /// </summary>
        internal void m_mthQuery()
        {
            if (m_objViewer.m_strStorageID == string.Empty)
            {
                MessageBox.Show("必须选择药库!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (m_objViewer.m_dtpSearchBeginDate.Text.Trim().Length < 11)
            {
                m_objViewer.m_dtpSearchBeginDate.Text = "";
            }
            if (m_objViewer.m_dtpSearchEndDate.Text.Trim().Length < 11)
            {
                m_objViewer.m_dtpSearchEndDate.Text = "";
            }

            if ((m_objViewer.m_dtpSearchBeginDate.Text.Trim().Length == 11) && (m_objViewer.m_dtpSearchEndDate.Text.Trim().Length == 11))
            {
                if ((Convert.ToDateTime(m_objViewer.m_dtpSearchBeginDate.Text)) > (Convert.ToDateTime(m_objViewer.m_dtpSearchEndDate.Text)))
                {
                    DialogResult tmpResult = MessageBox.Show("开始日期必须小于结束日期!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    m_objViewer.m_dtpSearchBeginDate.Focus();
                    return;
                }
            }

            long lngRes = 0;

            m_objViewer.m_dgvNewMedicine.DataSource = null;

            if (dtbResult != null)
            {
                dtbResult.Clear();
                dtbResult.Dispose();
                dtbResult = null;
            }

            m_objViewer.m_mthInitDataTable();
            ArrayList al = new ArrayList();

            al.Add(m_objViewer.m_strStorageID);
            DateTime m_datBeginTime = Convert.ToDateTime((Convert.ToDateTime(m_objViewer.m_dtpSearchBeginDate.Text)).ToString("yyyy-MM-dd 00:00:00"));
            DateTime m_datEndTime   = Convert.ToDateTime((Convert.ToDateTime(m_objViewer.m_dtpSearchEndDate.Text)).ToString("yyyy-MM-dd 23:59:59"));

            al.Add(m_datBeginTime);
            al.Add(m_datEndTime);
            al.Add(m_objViewer.m_txtMedicineName.Text.Trim());
            al.Add(m_objViewer.m_txtProviderName.Text);
            al.Add(m_objViewer.m_txtBillNumber.Text);
            if (m_objViewer.m_cboDoseType.SelectedIndex < 0 || m_objViewer.m_cboDoseType.SelectedIndex == 0)
            {
                al.Add(0);
            }
            else
            {
                clsMS_MedicineType_VO objVo = m_objViewer.m_cboDoseType.SelectedItem as clsMS_MedicineType_VO;
                al.Add(objVo.m_strMedicineTypeID_CHR);
            }

            dtbResult = new DataTable();

            lngRes = ((clsDcl_NewPurchaseMedicine)this.m_objDomain).m_lngGetNewPurchaseMedicine(al, out dtbResult);
            if ((lngRes > 0) && (dtbResult != null))
            {
                m_objViewer.m_dgvNewMedicine.DataSource = dtbResult;
            }
        }