コード例 #1
0
 internal static string SELECT(PuertoInfo source)
 {
     return(SELECT(new QueryConditions()
     {
         Puerto = source
     }));
 }
コード例 #2
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);
        }
コード例 #3
0
        internal void CopyValues(PuertoInfo source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);
        }
コード例 #4
0
        public static string SELECT_BY_PUERTO(long oid)
        {
            QueryConditions conditions = new QueryConditions()
            {
                Puerto = PuertoInfo.New()
            };

            conditions.Puerto.Oid = oid;

            return(ProviderBaseInfo.SELECT(conditions, ETipoAcreedor.Despachante));
        }
コード例 #5
0
        public static PuertoDespachante NewChild(PuertoInfo parent)
        {
            if (!CanAddObject())
            {
                throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED);
            }

            PuertoDespachante obj = new PuertoDespachante();

            obj.OidPuerto = parent.Oid;

            return(obj);
        }
コード例 #6
0
        public static string SELECT_FOMENTO(string cod_aduanero,
                                            NavieraInfo naviera,
                                            PuertoInfo p_origen,
                                            PuertoInfo p_destino,
                                            DateTime from,
                                            DateTime till)
        {
            QueryConditions conditions = new QueryConditions();

            string query = Expedient.FIELDS(conditions) +
                           Expedient.JOIN(conditions) +
                           Expedient.WHERE(conditions) +
                           " AND E.\"FECHA_CONOCIMIENTO\" >= '" + from.ToString("MM/dd/yyyy") + "'" +
                           " AND E.\"FECHA_CONOCIMIENTO\" <= '" + till.ToString("MM/dd/yyyy") + "'";

            if (cod_aduanero != string.Empty)
            {
                query += " AND E.\"CODIGO_ARTICULO\" = '" + cod_aduanero + "'";
            }
            if (naviera != null)
            {
                query += " AND E.\"OID_NAVIERA\" = " + naviera.Oid;
            }
            if (p_origen != null)
            {
                query += " AND E.\"PUERTO_ORIGEN\" = '" + p_origen.Valor + "'";
            }
            if (p_destino != null)
            {
                query += " AND E.\"PUERTO_DESTINO\" = '" + p_destino.Valor + "'";
            }

            query += " ORDER BY E.\"CODIGO\"";

            return(query);
        }
コード例 #7
0
 internal static string SELECT(long oid, bool lockTable)
 {
     return(SELECT(new QueryConditions {
         Puerto = PuertoInfo.New(oid)
     }, lockTable));
 }
コード例 #8
0
 public PuertoDespachante NewItem(PuertoInfo parent)
 {
     this.NewItem(PuertoDespachante.NewChild(parent));
     return(this[Count - 1]);
 }