public OrderTemplateListViewModel(string id_srvtpl)
        {
            this.qryService = XapServiceMgr.find <ICiOrdQryService>();
            OrderTemplateDTO orderTemplateDto = this.qryService.getSrvortplitemAggDOS(id_srvtpl);
            FMap             aggMap           = orderTemplateDto.Srvortplitemaggdo;
            FArrayList       srvagg           = aggMap["SrvortplitemAggDO"] as FArrayList;

            FMap       freqmap  = orderTemplateDto.Freqdefdo;
            FArrayList freqList = freqmap["FreqDefDO"] as FArrayList;


            FMap       measMap  = orderTemplateDto.Measdocdo;
            FArrayList measList = measMap["MeasDocDO"] as FArrayList;

            XapDataList <SrvortplitemAggDO> xaplist = new XapDataList <SrvortplitemAggDO>();

            if (srvagg != null)
            {
                foreach (SrvortplitemAggDO agg in srvagg)
                {
                    agg.setFreqdefdo(freqList);
                    agg.setmeasList(measList);
                    xaplist.Add(agg);
                }
            }
            SrvortplitemAggDOList = xaplist;
        }
Example #2
0
        public prescriptionListViewModel(string id_tpl)
        {
            this.qryService = XapServiceMgr.find <ICiOrdQryService>();
            //SrvortplitemAggDO[] agg = this.qryService.getSrvortplitemAggDOS(id_tpl);
            //if (agg != null && agg.Length>0)
            //{
            //    this.SrvortplitemAggDOList = new XapAggDO<SrvortplitemAggDO>(this.qryService, agg[0]);
            //}


            OrderTemplateDTO orderTemplateDto = this.qryService.getSrvortplitemAggDOS(id_tpl);
            FMap             fmap             = orderTemplateDto.Srvortplitemaggdo;
            FArrayList       srvagg           = fmap["SrvortplitemAggDO"] as FArrayList;
            FMap             freqmap          = orderTemplateDto.Freqdefdo;
            FArrayList       freqList         = freqmap["FreqDefDO"] as FArrayList;


            FMap       measMap  = orderTemplateDto.Measdocdo;
            FArrayList measList = measMap["MeasDocDO"] as FArrayList;

            if (srvagg != null)
            {
                SrvortplitemAggDOList = new XapAggDO <SrvortplitemAggDO>(this.qryService, (SrvortplitemAggDO)srvagg[0]);
                SrvortplitemAggDOList.AggDO.setFreqdefdo(freqList);
                SrvortplitemAggDOList.AggDO.setmeasList(measList);
            }
        }