コード例 #1
0
ファイル: LabDateTreeModel.cs プロジェクト: fhis/order.client
        private void loadObsDate(string ent, string type)
        {
            var dict = new Dictionary <string, List <OrObsAandLabDTO> >();

            OrObsAandLabDate = service.getObsAndLabDateList(ent, type);

            foreach (OrObsAandLabDTO labDto in OrObsAandLabDate)
            {
                if (dict.ContainsKey(getdate(labDto.Dtor)))
                {
                    //   List<OrObsAandLabDTO> list = dict[labDto.Dtor.Value.ToString().Substring(0, 10)];
                    List <OrObsAandLabDTO> list = dict[getdate(labDto.Dtor)];
                    list.Add(labDto);
                }
                else
                {
                    var list = new List <OrObsAandLabDTO>();
                    list.Add(labDto);
                    dict.Add(getdate(labDto.Dtor), list);
                }
            }
            var listkey = new List <string>();

            listkey.AddRange(dict.Keys);
            foreach (string s in listkey)
            {
                List <OrObsAandLabDTO> list = dict[s];
                var myModuleAdapter         = new KeyNodeDataAdapterFactory <OrObsAandLabDTO>("Id", "Parent");
                //   myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dtor.ToString().Substring(10, 5) + ")";
                myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dtor.Value.Hour + ":" + x.Dtor.Value.Minute + ")";
                KeyNodeDataCollection ObsDateCollection = myModuleAdapter.ToKeyNodeDataCollection(list);
                treedict.Add(s, ObsDateCollection);
            }
        }
コード例 #2
0
ファイル: LabTreeModel.cs プロジェクト: fhis/order.client
        private void loadObsDate(string ent, string type)
        {
            OrObsAandLab = service.getOrObsAandLabDTO(ent, type);
            if (OrObsAandLab == null || OrObsAandLab.Length == 0)
            {
                return;
            }
            List <string> pids = OrObsAandLab.Select(p => p.Parent).ToList();

            if (pids == null || pids.Count == 0)
            {
                return;
            }
            string filter = "";

            foreach (string s in pids)
            {
                filter += ("'" + s + "',");
            }

            SrvCateDO[] srvcados = srvcateMservice.find(
                "a0.id_srvca in (" + filter.Substring(0, filter.Count() - 1) + ")", "", FBoolean.False);


            var myModuleAdapter = new KeyNodeDataAdapterFactory <OrObsAandLabDTO>("Id", "Parent");

            myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dtor.ToString() + ")";
            ObsDateCollection = myModuleAdapter.ToKeyNodeDataCollection(OrObsAandLab);

            var srvcaAdapter = new KeyNodeDataAdapterFactory <SrvCateDO>("Id_srvca", "Id_srvca");

            srvcaAdapter.CustomCaptionFunc = x => x.Name;
            SrvCaCollection = srvcaAdapter.ToKeyNodeDataCollection(srvcados);
        }
コード例 #3
0
        private void loadObsDate(string ent)
        {
            var dict = new Dictionary <string, List <OrdApPathgyDTO> >();

            OrApPathgyDate = this.service.getPathgyList(ent);

            foreach (OrdApPathgyDTO pathgyDto in OrApPathgyDate)
            {
                if (dict.ContainsKey(pathgyDto.Dt_effe.Value.ToString().Substring(0, 10)))
                {
                    List <OrdApPathgyDTO> list = dict[pathgyDto.Dt_effe.Value.ToString().Substring(0, 10)];
                    list.Add(pathgyDto);
                }
                else
                {
                    var list = new List <OrdApPathgyDTO>();
                    list.Add(pathgyDto);
                    dict.Add(pathgyDto.Dt_effe.Value.ToString().Substring(0, 10), list);
                }
            }

            var listkey = new List <string>();

            listkey.AddRange(dict.Keys);
            foreach (string s in listkey)
            {
                List <OrdApPathgyDTO> list = dict[s];
                var myModuleAdapter        = new KeyNodeDataAdapterFactory <OrdApPathgyDTO>("Id_appathgy", "Id_srvca");
                myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dt_effe.ToString().Split(' ')[0] + ")";
                KeyNodeDataCollection ObsDateCollection = myModuleAdapter.ToKeyNodeDataCollection(list);
                treedict.Add(s, ObsDateCollection);
            }
        }
コード例 #4
0
        public void LoadData(string ent)
        {
            if (ent != null)
            {
                OrdApPathgyDTO[] apPathgyDtos = this.service.getPathgyList(ent);
                SrvCateDO[]      srvcados     = getCateDos(apPathgyDtos);

                var myModuleAdapter = new KeyNodeDataAdapterFactory <OrdApPathgyDTO>("Id_appathgy", "Id_srvca");
                myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dt_effe.ToString().Split(' ')[0] + ")";
                ObsDateCollection = myModuleAdapter.ToKeyNodeDataCollection(apPathgyDtos);

                var srvcaAdapter = new KeyNodeDataAdapterFactory <SrvCateDO>("Id_srvca", "Id_srvca");
                srvcaAdapter.CustomCaptionFunc = x => x.Name;
                SrvCaCollection = srvcaAdapter.ToKeyNodeDataCollection(srvcados);
            }
        }
コード例 #5
0
        private void loadObsDate()
        {
            if ((this.Context["PatientData"] as BannerData) != null)
            {
                ent4BannerDto = (this.Context["PatientData"] as BannerData).Ent4BannerDTO;

                OrdApPathgyDTO[] apPathgyDtos = this.ciservice.getPathgyList(ent4BannerDto.Id_ent);
                var dict = new Dictionary <string, List <OrdApPathgyDTO> >();


                foreach (OrdApPathgyDTO pathgyDto in apPathgyDtos)
                {
                    if (dict.ContainsKey(pathgyDto.Dt_effe.Value.ToString().Substring(0, 10)))
                    {
                        List <OrdApPathgyDTO> list = dict[pathgyDto.Dt_effe.Value.ToString().Substring(0, 10)];
                        list.Add(pathgyDto);
                    }
                    else
                    {
                        var list = new List <OrdApPathgyDTO>();
                        list.Add(pathgyDto);
                        dict.Add(pathgyDto.Dt_effe.Value.ToString().Substring(0, 10), list);
                    }
                }
                var listkey = new List <string>();
                listkey.AddRange(dict.Keys);
                foreach (string s in listkey)
                {
                    List <OrdApPathgyDTO> list = dict[s];
                    var myModuleAdapter        = new KeyNodeDataAdapterFactory <OrdApPathgyDTO>("Id_appathgy", "Id_srvca");
                    myModuleAdapter.CustomCaptionFunc = x => x.Name + "(" + x.Dt_effe.ToString().Substring(10, 5) + ")";
                    KeyNodeDataCollection ObsDateCollection = myModuleAdapter.ToKeyNodeDataCollection(list);
                    treedict.Add(s, ObsDateCollection);
                }
            }
        }