Example #1
0
        public void m_mthChargeMedBag()
        {
            if (this.dtPutMed != null)
            {
                List <string>     lisNeedChargePatient = new List <string>();
                List <string>     lisOrderCreateAreaID = new List <string>();
                clsDcl_CommonFind objDcl = new clsDcl_CommonFind();
                for (int intI = 0; intI < dtPutMed.Rows.Count; intI++)
                {
                    string strPutMedDetailID = dtPutMed.Rows[intI]["putmeddetailid_chr"].ToString();
                    string strInpatientID    = dtPutMed.Rows[intI]["inpatientid_chr"].ToString();
                    bool   blnIfCharge       = false;

                    if (!lisNeedChargePatient.Contains(strInpatientID))
                    {
                        string strOrderCreateAreaID = "";
                        objDcl.m_lngQueryIfChargeMedBag(strPutMedDetailID, ref blnIfCharge, ref strOrderCreateAreaID);
                        if (blnIfCharge == false)
                        {
                            lisNeedChargePatient.Add(strInpatientID);
                            lisOrderCreateAreaID.Add(strOrderCreateAreaID);
                        }
                    }
                }

                ArrayList alsOrderDic      = new ArrayList();
                ArrayList alsPatientCharge = new ArrayList();
                string    strOrderID       = "";

                for (int intI = 0; intI < lisNeedChargePatient.Count; intI++)
                {
                    string strInPatientID       = lisNeedChargePatient[intI];
                    string strOrderCreateAreaID = lisOrderCreateAreaID[intI];
                    int    intBagNum            = dicMedBagNum[strInPatientID];

                    clsBihOrderDic_VO      objOrderDicVO      = new clsBihOrderDic_VO();
                    clsBihPatientCharge_VO objPatientChargeVO = new clsBihPatientCharge_VO();
                    m_mthCreateChargeVO(ref objOrderDicVO, ref objPatientChargeVO, strInPatientID, intBagNum, strOrderCreateAreaID);
                    alsOrderDic.Add(objOrderDicVO);
                    alsPatientCharge.Add(objPatientChargeVO);
                }
                clsDcl_Charge objDcl1 = new clsDcl_Charge();
                objDcl1.m_lngGenPatientChargeByDir(alsOrderDic, alsPatientCharge, 9, ref strOrderID);

                for (int intI = 0; intI < dtPutMed.Rows.Count; intI++)
                {
                    string strPutMedDetailID = dtPutMed.Rows[intI]["putmeddetailid_chr"].ToString();
                    string strInpatientID    = dtPutMed.Rows[intI]["inpatientid_chr"].ToString();

                    if (lisNeedChargePatient.Contains(strInpatientID))
                    {
                        objDcl.m_lngUpdateIfChargeMedBag(strPutMedDetailID, 1);
                    }
                }
            }
        }