Ejemplo n.º 1
0
        public static ExpedienteList GetListFomento(string cod_aduanero,
                                                    NavieraInfo naviera,
                                                    PuertoInfo p_origen,
                                                    PuertoInfo p_destino,
                                                    DateTime from,
                                                    DateTime till)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            criteria.Childs = false;

            //No criteria. Retrieve all de List

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = ExpedienteList.SELECT_FOMENTO(cod_aduanero,
                                                               naviera,
                                                               p_origen,
                                                               p_destino,
                                                               from,
                                                               till);
            }

            ExpedienteList list = DataPortal.Fetch <ExpedienteList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Ejemplo n.º 2
0
        public static PaymentSummary Get(IAcreedor acreedor)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            if (nHManager.Instance.UseDirectSQL)
                criteria.Query = PaymentSummary.SELECT(acreedor);

            Expedient.BeginTransaction(criteria.Session);

            return DataPortal.Fetch<PaymentSummary>(criteria);
        }
Ejemplo n.º 3
0
        public static PaymentSummary Get(ETipoAcreedor tipo, long oid)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());
			
            if (nHManager.Instance.UseDirectSQL)
                criteria.Query = SELECT(ProviderBaseInfo.New(oid, tipo));

            Expedient.BeginTransaction(criteria.Session);

            return DataPortal.Fetch<PaymentSummary>(criteria);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <param name="get_childs">retrieving the childs</param>
        /// <returns></returns>
        public static ComprasList GetListByProducto(QueryConditions conditions)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            criteria.Childs = false;

            criteria.Query = ComprasList.SELECT_BY_PRODUCTO(conditions);

            ComprasList list = DataPortal.Fetch <ComprasList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Ejemplo n.º 5
0
        public static SortedBindingList <ExpedientInfo> GetSortedListByYear(bool childs, ETipoExpediente t, int ano, string sortProperty, ListSortDirection sortDirection)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            criteria.Childs = childs;

            criteria.Query = ExpedienteList.SELECT_BY_TYPE_AND_YEAR(t, ano);

            ExpedienteList list = DataPortal.Fetch <ExpedienteList>(criteria);

            CloseSession(criteria.SessionCode);

            SortedBindingList <ExpedientInfo> sortedList = new SortedBindingList <ExpedientInfo>(list);

            sortedList.ApplySort(sortProperty, sortDirection);
            return(sortedList);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Devuelve una lista de todos los elementos
        /// </summary>
        /// <returns>Lista de elementos</returns>
        private static ExpedienteList GetList(string query, bool childs)
        {
            if (!Expedient.CanGetObject())
            {
                throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED);
            }

            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            criteria.Childs = childs;

            criteria.Query = query;

            ExpedienteList list = DataPortal.Fetch <ExpedienteList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Ejemplo n.º 7
0
        public static LineaFomentoList GetInformeFomentoList(QueryConditions conditions, bool childs)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());

            criteria.Childs = childs;

            //No criteria. Retrieve all de List

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = LineaFomentoList.SELECT_INFORME_FOMENTO(conditions);
            }

            LineaFomentoList list = DataPortal.Fetch <LineaFomentoList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }