internal void Update(ClasePractica parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } //Debe obtener la SesionCronograma del padre pq el objeto es padre a su vez SessionCode = parent.SessionCode; OidClasePractica = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } SesionCronogramaRecord obj = parent.Session().Get <SesionCronogramaRecord>(Oid); obj.CopyValues(this.Base.Record); parent.Session().Update(obj); //_asistencias.Update(this); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
internal void DeleteSelf(ClasePractica parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } // if we're new then don't update the database if (this.IsNew) { return; } try { parent.Session().Delete(parent.Session().Get <AlumnoPracticaRecord>(Oid)); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkNew(); }
internal void Update(ClasePractica parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } OidClasePractica = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } AlumnoPracticaRecord obj = parent.Session().Get <AlumnoPracticaRecord>(Oid); obj.CopyValues(this.Base.Record); parent.Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
internal void Insert(ClasePractica parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } //Debe obtener la sesion del padre pq el objeto es padre a su vez SessionCode = parent.SessionCode; OidClasePractica = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } parent.Session().Save(this.Base.Record); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }