Exemplo n.º 1
0
        public void m_FillItem()
        {
            com.digitalwave.iCare.ValueObject.clsChargeItem_VO[] objResult = this.m_clsChargeItem_VO;
            if (objResult.Length > 0)
            {
                return;
            }
            long lngRes = clsDomain.m_lngGetItemByCMUsageID(strUsageID, out objResult);

            this.m_dtgGroup.BeginUpdate();
            this.m_dtgGroup.m_mthDeleteAllRow();
            if ((lngRes > 0) && (objResult != null))
            {
                double dblTem = 0;
                string strClinicUnit = "", strGetBihUnit = "", strClinicNumberUnit = "", strBihNumberUnit = "";
                for (int i = 0; i < objResult.Length; i++)
                {
                    GetUnit(objResult[i], out strClinicUnit, out strGetBihUnit);

                    if (objResult[i].m_intCLINICTYPE_INT == 1)//门诊领量单位
                    {
                        strClinicNumberUnit = objResult[i].m_strUNITPRICE.Trim() + strClinicUnit.Trim();
                    }
                    else if (objResult[i].m_intCLINICTYPE_INT == 2)
                    {
                        strClinicNumberUnit = objResult[i].m_strUNITPRICE.Trim() + objResult[i].m_DosageUnit.m_strUnitID;
                    }
                    if (objResult[i].m_intBIHTYPE_INT == 1)//门诊领量单位
                    {
                        strBihNumberUnit = objResult[i].m_dblBIHQTY_DEC.ToString().Trim() + strGetBihUnit.Trim();
                    }
                    else if (objResult[i].m_intBIHTYPE_INT == 2)
                    {
                        strBihNumberUnit = objResult[i].m_dblBIHQTY_DEC.ToString().Trim() + objResult[i].m_DosageUnit.m_strUnitID;
                    }
                    dblTem = 0;
                    try
                    {
                        dblTem = double.Parse(objResult[i].m_strTOTALPRICE);
                    }
                    catch { }

                    this.m_dtgGroup.m_mthAppendRow(new object[] { objResult[i].m_ItemOPInvType.m_strTypeID,
                                                                  objResult[i].m_strItemID,
                                                                  objResult[i].m_strItemName,
                                                                  m_mthConvertToChType(objResult[i].m_ItemCat.m_strItemCatID),
                                                                  objResult[i].m_strItemSpec,
                                                                  objResult[i].m_fltItemPrice.ToString("0.0000"),
                                                                  strClinicNumberUnit,
                                                                  (objResult[i].m_intCLINICTYPE_INT == 1)?"门诊领量单位":"门诊剂量单位",
                                                                  dblTem.ToString("0.00"),
                                                                  strBihNumberUnit,
                                                                  (objResult[i].m_intBIHTYPE_INT == 1)?"住院领量单位":"住院剂量单位",
                                                                  "",
                                                                  strGetContinueUseTypeName(objResult[i].m_intCONTINUEUSETYPE_INT),
                                                                  objResult[i].m_strDosage.ToString(),
                                                                  objResult[i].m_DosageUnit.m_strUnitID,
                                                                  strClinicUnit,
                                                                  strGetBihUnit,
                                                                  objResult[i].m_strUNITPRICE,
                                                                  objResult[i].m_dblBIHQTY_DEC,
                                                                  objResult[i].m_intCONTINUEUSETYPE_INT });
                    this.m_dtgGroup.BeginUpdate();
                    if (objResult[i].m_intStopFlag == 1 && objResult[i].m_intItemSrcType == 1)
                    {
                        for (int f2 = 0; f2 < this.m_dtgGroup.Columns.Count; f2++)
                        {
                            this.m_dtgGroup.m_mthFormatCell(i, f2, m_dtgGroup.Font, System.Drawing.Color.White, System.Drawing.Color.Red);
                        }
                    }
                    this.m_dtgGroup.EndUpdate();
                    //填充门诊费用合计、住院费用合计


                    m_mthCalMoney(objResult);
                }
            }
        }