Пример #1
0
        public medSrvRadioViewModel(string code_entp, string fgUse, string strWhere)
        {
            this.service    = XapServiceMgr.find <IMedsrvMDOCrudService>();
            this.qryService = XapServiceMgr.find <ICiOrdQryService>();
            if (string.IsNullOrEmpty(strWhere))
            {
                return;
            }
            //medSrvDOList = qryService.getClassMedSrvDOS("  a0.fg_active='Y' and a0.fg_or ='Y' and  a0.Id_srvca = '" + strWhere + "' and "+ fgUse +"='Y'", "Id_srvca",false);

            medSrvDOMap = qryService.getClassMedSrvMap(code_entp, "  a0.fg_active='Y' and a0.fg_or ='Y' and  a0.Id_srvca = '" + strWhere + "' and " + fgUse + "='Y'", "Id_srvca");

            // medSrvDOList.AddRange( map["medSrvList"] as XapDataList<MedSrvDO>);
            SrvStatusMap = medSrvDOMap["srvStatusMap"] as FMap2;



            FArrayList2 objList = medSrvDOMap["medSrvList"] as FArrayList2;

            if (objList != null)
            {
                medSrvDOList = (XapDataList <MedSrvDO>)objList.Cast <MedSrvDO>().ToArray();
            }

            //medSrvDOList = service.find("  a0.fg_active='Y' and  a0.Id_srvca = '" + strWhere + "'", "Id_srvca", false);
            if (medSrvDOList != null && medSrvDOList.Count > 0)
            {
                medSrvDOListPyCode = new XapDataList <MedSrvDO>();
                foreach (MedSrvDO medSrv in medSrvDOList)
                {
                    if (medSrv.Id_srv == null)
                    {
                        medSrvDOListPyCode.Add(medSrv);
                    }
                }
            }
        }