示例#1
0
 private void DoInsertUpdate(RolesPerfiles detalle)
 {
     using (BypassPropertyChecks)
     {
         detalle.IdRolPerfil     = ID;
         detalle.IdAplicacion    = IdAplicacion;
         detalle.IdPerfilUsuario = IdPerfilUsuario;
         detalle.IdRol           = IdRol;
     }
 }
示例#2
0
 internal void Child_Insert(PerfilUsuario parent)
 {
     using (var ctx = DbContextManager <SeguridadEntities> .GetManager(BaseDatos.ConexionBD))
     {
         var detalle = new RolesPerfiles();
         IdPerfilUsuario = parent.ID;
         DoInsertUpdate(detalle);
         ctx.DbContext.RolesPerfiles.Add(detalle);
         FieldManager.UpdateChildren(this);
     }
 }
示例#3
0
 protected override void DataPortal_Update()
 {
     try
     {
         using (var ctx = DbContextManager <SeguridadEntities> .GetManager(BaseDatos.ConexionBD))
         {
             if (IsSelfDirty)
             {
                 var entidad = ctx.DbContext.SelectPerfilUsuario(ID).FirstOrDefault();
                 DoInsertUpdate(entidad);
             }
             RolesPerfiles.Save();
             if (Recursos != null)
             {
                 Recursos.Save();
             }
             ctx.DbContext.SaveChanges();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }