protected override void DataPortal_Execute() { // Buscar por codigo CriteriaEx criteria = Incidencia.GetCriteria(Incidencia.OpenSession()); criteria.AddCodeSearch(_codigo); IncidenciaList list = IncidenciaList.GetList(criteria); _exists = !(list.Count == 0); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <param name="retrieve_childs">Retrieving the childs</param> /// <returns></returns> public static IncidenciaList GetList(bool retrieve_childs) { CriteriaEx criteria = Incidencia.GetCriteria(Incidencia.OpenSession()); criteria.Childs = retrieve_childs; //No criteria. Retrieve all de List if (nHManager.Instance.UseDirectSQL) { criteria.Query = IncidenciaList.SELECT(); } IncidenciaList list = DataPortal.Fetch <IncidenciaList>(criteria); CloseSession(criteria.SessionCode); return(list); }