internal void Update(PlanAnual parent) { this.RaiseListChangedEvents = false; // update (thus deleting) any deleted child objects foreach (Plan_Tipo 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 (Plan_Tipo obj in this) { if (obj.IsNew) { obj.Insert(parent); } else { obj.Update(parent); } } this.RaiseListChangedEvents = true; }
public void Clone(PlanAnual plan) { foreach (Plan_Tipo item in this) { item.OidPlan = plan.Oid; } }
internal void DeleteSelf(PlanAnual 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 <Plan_TipoRecord>(Oid)); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkNew(); }
public void CopyValues(PlanAnual source) { if (source == null) { return; } _record.CopyValues(source.Base.Record); }
public static Plan_Tipo NewChild(PlanAnual parent) { if (!CanAddObject()) { throw new System.Security.SecurityException( moleQule.Library.Resources.Messages.USER_NOT_ALLOWED); } Plan_Tipo obj = new Plan_Tipo(); obj.OidPlan = parent.Oid; return(obj); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <param name="get_childs">retrieving the childs</param> /// <returns></returns> public static PlanAnualList GetList(bool childs) { CriteriaEx criteria = PlanAnual.GetCriteria(PlanAnual.OpenSession()); criteria.Childs = childs; //No criteria. Retrieve all de List if (nHManager.Instance.UseDirectSQL) { criteria.Query = PlanAnualList.SELECT(); } PlanAnualList list = DataPortal.Fetch <PlanAnualList>(criteria); CloseSession(criteria.SessionCode); return(list); }
internal void Insert(PlanAnual parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { OidPlan = parent.Oid; parent.Session().Save(this.Base.Record); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
internal void Update(PlanAnual parent) { // if we're not dirty then don't update the database if (!this.IsDirty) { return; } try { SessionCode = parent.SessionCode; Plan_TipoRecord obj = Session().Get <Plan_TipoRecord>(Oid); obj.CopyValues(this.Base.Record); Session().Update(obj); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public void CopyFrom(PlanAnual source) { _base.CopyValues(source); }
public Plan_Tipo NewItem(PlanAnual parent) { this.AddItem(Plan_Tipo.NewChild(parent)); return(this[Count - 1]); }
public static string SELECT() { return(PlanAnual.SELECT(new QueryConditions(), false)); }