public void CopyValues(PuntoActa source) { if (source == null) { return; } _record.CopyValues(source.Base.Record); }
private void DataPortal_Fetch(CriteriaEx criteria) { try { SessionCode = criteria.SessionCode; Childs = criteria.Childs; if (nHMng.UseDirectSQL) { ActaComite.DoLOCK(Session()); IDataReader reader = nHMng.SQLNativeSelect(criteria.Query, Session()); if (reader.Read()) { _base.CopyValues(reader); } if (Childs) { string query = string.Empty; PuntoActa.DoLOCK(Session()); query = PuntosActas.SELECT_BY_ACTA(this.Oid); reader = nHManager.Instance.SQLNativeSelect(query, Session()); _puntoactas = PuntosActas.GetChildList(reader); } } else { Session().Lock(Session().Get <ActaComiteRecord>(Oid), LockMode.UpgradeNoWait); _base.Record.CopyValues((ActaComiteRecord)(criteria.UniqueResult())); if (Childs) { criteria = PuntoActa.GetCriteria(Session()); criteria.AddEq("OidActa", this.Oid); _puntoactas = PuntosActas.GetChildList(criteria.List <PuntoActa>()); } } } catch (NHibernate.ADOException) { if (Transaction() != null) { Transaction().Rollback(); } throw new iQLockException(moleQule.Library.Resources.Messages.LOCK_ERROR); } catch (Exception ex) { if (Transaction() != null) { Transaction().Rollback(); } iQExceptionHandler.TreatException(ex); } }
/// <summary> /// Builds a PuntoActaList /// </summary> /// <param name="list"></param> /// <returns>PuntoActaList</returns> public static PuntoActaList GetList(bool childs) { CriteriaEx criteria = PuntoActa.GetCriteria(PuntoActa.OpenSession()); criteria.Childs = childs; criteria.Query = PuntoActaList.SELECT(); PuntoActaList list = DataPortal.Fetch <PuntoActaList>(criteria); CloseSession(criteria.SessionCode); return(list); }
// called to copy objects data from list private void Fetch(IDataReader reader) { this.RaiseListChangedEvents = false; IsReadOnly = false; while (reader.Read()) { this.Add(PuntoActa.GetChild(reader).GetInfo()); } IsReadOnly = true; this.RaiseListChangedEvents = true; }
public static string SELECT() { return(PuntoActa.SELECT(new QueryConditions(), false)); }
public void CopyFrom(PuntoActa source) { _base.CopyValues(source); }