Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// </summary>
 /// <param name="id_ent"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public OrObsAandLabDTO[] getOrObsAandLabDTO(string id_ent, string type)
 {
     return(service.getOrObsAandLabDTO(id_ent, type));
 }