protected override void DataPortal_Execute() { // Buscar por codigo CriteriaEx criteria = Modulo.GetCriteria(Modulo.OpenSession()); criteria.AddCodeSearch(_codigo); ModuloList list = ModuloList.GetList(criteria); _exists = !(list.Count == 0); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <param name="get_childs">retrieving the childs</param> /// <returns></returns> public static ModuloList GetOrderedList(bool childs) { CriteriaEx criteria = Modulo.GetCriteria(Modulo.OpenSession()); criteria.Childs = childs; criteria.Query = ModuloList.SELECT_ORDERED("NumeroOrden"); //No criteria. Retrieve all de List ModuloList list = DataPortal.Fetch <ModuloList>(criteria); CloseSession(criteria.SessionCode); return(list); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <param name="get_childs">retrieving the childs</param> /// <returns></returns> public static ModuloList GetListByPromocion(bool childs, long oid_promocion) { CriteriaEx criteria = Modulo.GetCriteria(Modulo.OpenSession()); criteria.Childs = childs; criteria.Query = ModuloList.SELECT_BY_PROMOCION(oid_promocion); //No criteria. Retrieve all de List ModuloList list = DataPortal.Fetch <ModuloList>(criteria); CloseSession(criteria.SessionCode); return(list); }