예제 #1
0
        public static void ProcessCEI10()
        {
            CEI_10List generatedList = new CEI_10List();
            CEI_10BE   generatedBE   = null;
            var        tempList      = Retrive_Temporal_All();

            string auxiliar = string.Empty;

            foreach (CEI10_Temp cei10_temp in tempList.OrderBy(p => p.Id))
            {
                generatedBE             = new CEI_10BE();
                generatedBE.Description = cei10_temp.Description;
                generatedBE.Code        = cei10_temp.Code.Trim();
                if (!string.IsNullOrEmpty(cei10_temp.ParentCode.Trim()))
                {
                    auxiliar = cei10_temp.Code.Trim();
                    generatedBE.ParentCode = cei10_temp.ParentCode.Trim();
                    generatedBE.HasChilds  = true;
                }
                else
                {
                    generatedBE.ParentCode = auxiliar;
                }
                generatedList.Add(generatedBE);
            }

            foreach (CEI_10BE item in generatedList)
            {
                item.HasChilds = generatedList.Any(p => p.ParentCode.Equals(item.Code));
            }
            Insert(generatedList);
        }
예제 #2
0
 public static CEI_10List Retrive_All_ChildsOnly()
 {
     CEI_10List list = new CEI_10List();
     using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities))
     {
         CEI_10BE c;
         foreach (CEI_10 item in dc.CEI_10.Where(p => p.HasChilds.Equals(false)))
         {
             //list.Add((CEI_10BE)c);
             c = new CEI_10BE();
             c.Code = item.Code;
             c.Description = item.Description;
             list.Add(c);
         }
     }
     return list;
 }
예제 #3
0
        public static CEI_10List Retrive_All_ChildsOnly()
        {
            CEI_10List list = new CEI_10List();

            using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities))
            {
                CEI_10BE c;
                foreach (CEI_10 item in dc.CEI_10.Where(p => p.HasChilds.Equals(false)))
                {
                    //list.Add((CEI_10BE)c);
                    c             = new CEI_10BE();
                    c.Code        = item.Code;
                    c.Description = item.Description;
                    list.Add(c);
                }
            }
            return(list);
        }
예제 #4
0
        public static void ProcessCEI10()
        {
            CEI_10List generatedList = new CEI_10List();
            CEI_10BE generatedBE = null;
            var tempList = Retrive_Temporal_All();

            string auxiliar = string.Empty;
            foreach (CEI10_Temp cei10_temp in tempList.OrderBy(p=>p.Id))
            {
                generatedBE = new CEI_10BE();
                generatedBE.Description = cei10_temp.Description;
                generatedBE.Code = cei10_temp.Code.Trim();
                if (!string.IsNullOrEmpty(cei10_temp.ParentCode.Trim()))
                {
                    auxiliar = cei10_temp.Code.Trim();
                    generatedBE.ParentCode = cei10_temp.ParentCode.Trim();
                    generatedBE.HasChilds = true;
                }
                else
                {
                    generatedBE.ParentCode = auxiliar;
                }
                generatedList.Add(generatedBE);
            }

            foreach (CEI_10BE item in generatedList)
            {
                item.HasChilds = generatedList.Any(p => p.ParentCode.Equals(item.Code));
            }
            Insert(generatedList);
        }
예제 #5
0
 /// <summary>
 /// Constructor from Model Entity
 /// Framework BE --> Edm Entity Model
 /// </summary>
 /// <param name="pCEI10">Edm Model BE</param>
 public CEI10Combo(CEI_10BE pCEI10)
 {
     _Code        = pCEI10.Code.Trim();
     _Description = pCEI10.Description;
 }