private void Child_Fetch(Datos.RecursoDetalle childData) { using (BypassPropertyChecks) { ID = childData.IdRecursoDetalle; IdRecurso = childData.IdRecurso; IdRecursoDetallePadre = childData.IdRecursoDetallePadre; Codigo = childData.Codigo; Descripcion = childData.Descripcion; Nivel = childData.Nivel; } MarkOld(); }
private void Child_Insert(IRecurso parent) { using (var ctx = DbContextManager <SeguridadEntities> .GetManager(BaseDatos.ConexionBD)) { var detalle = new Datos.RecursoDetalle(); IdRecurso = parent.IdRecurso; DoInsertUpdate(detalle); ctx.DbContext.RecursoDetalle.Add(detalle); FieldManager.UpdateChildren(this); } }
private void DoInsertUpdate(Datos.RecursoDetalle dr) { using (BypassPropertyChecks) { dr.IdRecursoDetalle = ID; dr.IdRecurso = IdRecurso; if (string.IsNullOrEmpty(IdRecursoDetallePadre)) { dr.IdRecursoDetallePadre = null; } else { dr.IdRecursoDetallePadre = IdRecursoDetallePadre; } dr.Codigo = Codigo; dr.Descripcion = Descripcion; dr.Nivel = Nivel; } }
internal static RecursoDetalle GetRecursoDetalle(Datos.RecursoDetalle childData) { return(DataPortal.FetchChild <RecursoDetalle>(childData)); }