Example #1
0
        static void Insert(CEI_10List list)
        {

            using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities))
            {
                CEI_10 wCEI_10;
                try
                {
                    foreach (CEI_10BE c in list)
                    {
                        //falla i10
                        wCEI_10 = new CEI_10();
                        wCEI_10.ParentCode = c.ParentCode.Trim();
                        wCEI_10.Code = c.Code.Trim();
                        wCEI_10.Description = c.Description;
                        wCEI_10.HasChilds = c.HasChilds;

                        dc.CEI_10.AddObject(wCEI_10);
                        dc.SaveChanges();
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }
        }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CEI_10 EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCEI_10(CEI_10 cEI_10)
 {
     base.AddObject("CEI_10", cEI_10);
 }
Example #3
0
 /// <summary>
 /// Create a new CEI_10 object.
 /// </summary>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="parentCode">Initial value of the ParentCode property.</param>
 /// <param name="hasChilds">Initial value of the HasChilds property.</param>
 public static CEI_10 CreateCEI_10(global::System.String code, global::System.String description, global::System.String parentCode, global::System.Boolean hasChilds)
 {
     CEI_10 cEI_10 = new CEI_10();
     cEI_10.Code = code;
     cEI_10.Description = description;
     cEI_10.ParentCode = parentCode;
     cEI_10.HasChilds = hasChilds;
     return cEI_10;
 }