Example #1
0
 private void DoInsertUpdate(OpcionUI dr)
 {
     using (BypassPropertyChecks)
     {
         //Establecer las propiedades del Objeto Entity
         dr.IdOpcionUI   = ID;
         dr.IdAplicacion = IdAplicacion;
         dr.Codigo       = Codigo;
         dr.Nombre       = Nombre;
         if (string.IsNullOrEmpty(IdOpcionPadre))
         {
             dr.IdOpcionPadre = null;
         }
         else
         {
             dr.IdOpcionPadre = IdOpcionPadre;
         }
         dr.Nivel    = Nivel;
         dr.Tipo     = Tipo;
         dr.Clase    = Clase;
         dr.Url      = Url;
         dr.NroOrden = NroOrden;
         dr.Estado   = Estado;
     }
 }
Example #2
0
        private void Child_Insert()
        {
            using (var ctx = DbContextManager <SeguridadEntities> .GetManager(BaseDatos.ConexionBD))
            {
                var detalle = new OpcionUI();
                IdAplicacion = ApplicationContext.LocalContext["IDPadre"].ToString();
                DoInsertUpdate(detalle);

                ctx.DbContext.OpcionUI.Add(detalle);

                FieldManager.UpdateChildren(this);
            }
        }
Example #3
0
 private void Child_Fetch(OpcionUI childData)
 {
     using (BypassPropertyChecks)
     {
         ID            = childData.IdOpcionUI;
         IdAplicacion  = childData.IdAplicacion;
         IdOpcionPadre = childData.IdOpcionPadre ?? string.Empty;
         Codigo        = childData.Codigo;
         Nombre        = childData.Nombre;
         Nivel         = childData.Nivel;
         Tipo          = childData.Tipo;
         Clase         = childData.Clase;
         Url           = childData.Url;
         NroOrden      = childData.NroOrden.HasValue ? childData.NroOrden.Value : 0;
         Estado        = childData.Estado;
     }
     MarkOld();
 }
Example #4
0
 internal static Opcion GetOpcion(OpcionUI childData)
 {
     return(DataPortal.FetchChild <Opcion>(childData));
 }