internal void Update(PlanEstudios parent) { this.RaiseListChangedEvents = false; // update (thus deleting) any deleted child objects foreach (Horario obj in DeletedList) { obj.DeleteSelf(parent); } // now that they are deleted, remove them from memory too DeletedList.Clear(); // AddItem/update any current child objects foreach (Horario obj in this) { if (obj.IsNew) { obj.Insert(parent); } else { obj.Update(parent); } } this.RaiseListChangedEvents = true; }
internal void Insert(PlanEstudios 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; OidPlan = 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(); }
internal void DeleteSelf(PlanEstudios 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 { SessionCode = parent.SessionCode; Session().Delete(Session().Get <ClaseTeoricaRecord>(Oid)); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkNew(); }
public void CopyValues(PlanEstudios source) { if (source == null) { return; } _record.CopyValues(source.Base.Record); }
public static ClaseTeorica NewChild(PlanEstudios parent) { if (!CanAddObject()) { throw new System.Security.SecurityException( moleQule.Library.Resources.Messages.USER_NOT_ALLOWED); } ClaseTeorica obj = new ClaseTeorica(); obj.OidPlan = parent.Oid; return(obj); }
public static MaterialDocente NewChild(PlanEstudios parent) { if (!CanAddObject()) { throw new System.Security.SecurityException( moleQule.Library.Resources.Messages.USER_NOT_ALLOWED); } MaterialDocente obj = new MaterialDocente(); obj.OidModulo = parent.Oid; return(obj); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <param name="get_childs">retrieving the childs</param> /// <returns></returns> public static PlanEstudiosList GetList(bool childs) { CriteriaEx criteria = PlanEstudios.GetCriteria(PlanEstudios.OpenSession()); criteria.Childs = childs; criteria.Query = PlanEstudiosList.SELECT(); //No criteria. Retrieve all de List PlanEstudiosList list = DataPortal.Fetch <PlanEstudiosList>(criteria); CloseSession(criteria.SessionCode); return(list); }
internal void Update(PlanEstudios 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; OidModulo = parent.Oid; try { ValidationRules.CheckRules(); if (!IsValid) { throw new iQValidationException(moleQule.Library.Resources.Messages.GENERIC_VALIDATION_ERROR); } MaterialDocenteRecord obj = parent.Session().Get <MaterialDocenteRecord>(Oid); obj.CopyValues(this.Base.Record); parent.Session().Update(obj); _revisiones.Update(this); _planes.Update(this); _alumnos.Update(this); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public static string SELECT() { return(PlanEstudios.SELECT(new QueryConditions(), false)); }
public Horario NewItem(PlanEstudios parent) { this.AddItem(Horario.NewChild(parent)); return(this[Count - 1]); }
public Promocion NewItem(PlanEstudios parent) { this.AddItem(Promocion.NewChild(parent)); return(this[Count - 1]); }
public ClaseTeorica NewItem(PlanEstudios parent) { this.AddItem(ClaseTeorica.NewChild(parent)); return(this[Count - 1]); }
public MaterialDocente NewItem(PlanEstudios parent) { this.AddItem(MaterialDocente.NewChild(parent)); return(this[Count - 1]); }
public Cronograma NewItem(PlanEstudios parent) { this.AddItem(Cronograma.NewChild(parent)); return(this[Count - 1]); }
public void CopyFrom(PlanEstudios source) { _base.CopyValues(source); }