예제 #1
0
        //------------------------------------------------------------
        public virtual CResultAErreur Serialize(C2iSerializer serializer)
        {
            int            nVersion = GetNumVersion();
            CResultAErreur result   = serializer.TraiteVersion(ref nVersion);

            if (!result)
            {
                return(result);
            }
            serializer.TraiteString(ref m_strNomChampFinal);

            int nOp = (int)m_operationAgregation;

            serializer.TraiteInt(ref nOp);
            m_operationAgregation = (OperationsAgregation)nOp;

            if (nVersion < 2)
            {
                string strTmp = "";
                serializer.TraiteString(ref strTmp);
                CSourceDeChampDeRequete source = new CSourceDeChampDeRequete(strTmp);
                serializer.TraiteString(ref strTmp);
                source.ChampDeTable = strTmp;
                serializer.TraiteString(ref strTmp);
                source.Alias   = strTmp;
                m_listeSources = new ArrayList();
                m_listeSources.Add(source);
            }
            else
            {
                result = serializer.TraiteArrayListOf2iSerializable(m_listeSources);
                if (!result)
                {
                    return(result);
                }
            }
            serializer.TraiteBool(ref m_bGroupBy);

            serializer.TraiteType(ref m_typeDonneeAvantAgregation);

            if (nVersion >= 1)
            {
                serializer.TraiteString(ref m_strFonctionSql);
            }

            if (nVersion >= 3)
            {
                serializer.TraiteType(ref m_typeDonneeFinalForce);
            }
            else
            {
                m_typeDonneeFinalForce = null;
            }

            return(result);
        }
예제 #2
0
 //----------------------------------------
 public C2iChampDeRequete(
     string strNomChampFinal,
     CSourceDeChampDeRequete source,
     Type typeDonneeAvantAgregation,
     OperationsAgregation operation,
     bool bGroupBy)
 {
     NomChamp       = strNomChampFinal;
     m_listeSources = new ArrayList();
     m_listeSources.Add(source);
     TypeDonneeAvantAgregation = typeDonneeAvantAgregation;
     OperationAgregation       = operation;
     GroupBy = bGroupBy;
 }
예제 #3
0
        //--------------------------------------
        public override bool Equals(object obj)
        {
            if (!(obj is CSourceDeChampDeRequete))
            {
                return(false);
            }
            CSourceDeChampDeRequete source = (CSourceDeChampDeRequete)obj;

            if (source.m_strSource != m_strSource)
            {
                return(false);
            }
            if (source.m_strChampDeTable != m_strChampDeTable)
            {
                return(false);
            }
            return(true);
        }