private List <Galatee.Silverlight.ServiceParametrage.CsLibelle> ConstruireListeTypeDeBaseDeDonnees()
        {
            List <CsLibelle> ListeDeRetour       = new List <CsLibelle>();
            CsLibelle        TypeDeBaseDeDonnees = null;

            try
            {
                //SQL SERVER
                TypeDeBaseDeDonnees         = new CsLibelle();
                TypeDeBaseDeDonnees.CODE    = "SQL SERVER";
                TypeDeBaseDeDonnees.LIBELLE = "System.Data.SqlClient";
                ListeDeRetour.Add(TypeDeBaseDeDonnees);
                // POSTGRESQL
                TypeDeBaseDeDonnees         = new CsLibelle();
                TypeDeBaseDeDonnees.CODE    = "POSTGRESQL";
                TypeDeBaseDeDonnees.LIBELLE = "Devart.Data.PostgreSql";
                ListeDeRetour.Add(TypeDeBaseDeDonnees);
                // ORACLE
                TypeDeBaseDeDonnees         = new CsLibelle();
                TypeDeBaseDeDonnees.CODE    = "ORACLE";
                TypeDeBaseDeDonnees.LIBELLE = "Oracle.DataAccess.Client";
                ListeDeRetour.Add(TypeDeBaseDeDonnees);
                return(ListeDeRetour);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static List <CsLibelle> FillTa(SqlDataReader reader, List <CsLibelle> rows, int start, int pageLength)
        {
            for (int i = 0; i < start; i++)
            {
                if (!reader.Read())
                {
                    return(rows);
                }
            }
            string LClient = string.Empty;

            for (int i = 0; i < pageLength; i++)
            {
                if (!reader.Read())
                {
                    break;
                }

                try
                {
                    CsLibelle c = new CsLibelle();
                    c.CODE    = (Convert.IsDBNull(reader["CODE"])) ? String.Empty : (System.String)reader["CODE"];
                    c.LIBELLE = (Convert.IsDBNull(reader["LIBELLE"])) ? String.Empty : (System.String)reader["LIBELLE"];
                    rows.Add(c);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            return(rows);
        }
        private List <CsLibelle> ConstituerListeGroupeBoxSaisie()
        {
            try
            {
                List <CsLibelle> ListeLibelle = new List <CsLibelle>();
                CsLibelle        Facultatif   = new CsLibelle();
                Facultatif.CODE    = "F";
                Facultatif.LIBELLE = Languages.LibFacultatif;
                ListeLibelle.Add(Facultatif);

                CsLibelle Interdit = new CsLibelle();

                Interdit.CODE    = "I";
                Interdit.LIBELLE = Languages.LibInterdit;
                ListeLibelle.Add(Interdit);

                CsLibelle Obligatoire = new CsLibelle();

                Obligatoire.CODE    = "O";
                Obligatoire.LIBELLE = Languages.LibObligatoire;
                ListeLibelle.Add(Obligatoire);

                return(ListeLibelle);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #4
0
        private List <CsLibelle> ConstruireListeRedevance()
        {
            List <CsLibelle> ListeRedevance = new List <CsLibelle>();

            CsLibelle RedevanceNormale = new CsLibelle();

            RedevanceNormale.CODE    = "0";
            RedevanceNormale.LIBELLE = Languages.RedevanceNormale;
            ListeRedevance.Add(RedevanceNormale);

            CsLibelle RedevanceParametreAutre = new CsLibelle();

            RedevanceParametreAutre.CODE    = "1";
            RedevanceParametreAutre.LIBELLE = Languages.RedevanceParametreAutre;
            ListeRedevance.Add(RedevanceParametreAutre);

            CsLibelle RedevanceAdmettantRedevanceEnParametre = new CsLibelle();

            RedevanceAdmettantRedevanceEnParametre.CODE    = "2";
            RedevanceAdmettantRedevanceEnParametre.LIBELLE = Languages.RedevanceAdmettantRedevanceEnParametre;
            ListeRedevance.Add(RedevanceAdmettantRedevanceEnParametre);

            CsLibelle RedevanceParametreAutreAdmettantRedevanceEnParametre = new CsLibelle();

            RedevanceParametreAutreAdmettantRedevanceEnParametre.CODE    = "3";
            RedevanceParametreAutreAdmettantRedevanceEnParametre.LIBELLE = Languages.RedevanceParametreAutreAdmettantRedevanceEnParametre;
            ListeRedevance.Add(RedevanceParametreAutreAdmettantRedevanceEnParametre);

            return(ListeRedevance);
        }
        private List <CsLibelle> ConstituerListeGroupeBoxFacturation()
        {
            List <CsLibelle> ListeLibelle = new List <CsLibelle>();

            try
            {
                CsLibelle Normale = new CsLibelle();
                Normale.CODE    = "1";
                Normale.LIBELLE = Languages.LibNormale;
                ListeLibelle.Add(Normale);

                CsLibelle Forfait = new CsLibelle();
                Forfait.CODE    = "2";
                Forfait.LIBELLE = Languages.LibForfait;
                ListeLibelle.Add(Forfait);

                CsLibelle BloqueSansRegularisation = new CsLibelle();
                BloqueSansRegularisation.CODE    = "3";
                BloqueSansRegularisation.LIBELLE = Languages.LibBloqueeSansRegularisation;
                ListeLibelle.Add(BloqueSansRegularisation);

                CsLibelle SansTarifUnitaire = new CsLibelle();
                SansTarifUnitaire.CODE    = "4";
                SansTarifUnitaire.LIBELLE = Languages.LibSansTarifUnitaire;
                ListeLibelle.Add(SansTarifUnitaire);

                CsLibelle SansTarifAnnuel = new CsLibelle();
                SansTarifAnnuel.CODE    = "5";
                SansTarifAnnuel.LIBELLE = Languages.LibSansTarifAnnuel;
                ListeLibelle.Add(SansTarifAnnuel);

                CsLibelle ForfaitSansRegularisation = new CsLibelle();
                ForfaitSansRegularisation.CODE    = "6";
                ForfaitSansRegularisation.LIBELLE = Languages.LibForfaitSansRegularisation;
                ListeLibelle.Add(ForfaitSansRegularisation);

                CsLibelle BloqueAvecRegulation = new CsLibelle();
                BloqueAvecRegulation.CODE    = "7";
                BloqueAvecRegulation.LIBELLE = Languages.LibBloqueeAvecRegularisation;
                ListeLibelle.Add(BloqueAvecRegulation);

                CsLibelle EstimeAvecRegularisation = new CsLibelle();
                EstimeAvecRegularisation.CODE    = "8";
                EstimeAvecRegularisation.LIBELLE = Languages.LibEstimeeAvecRegularisation;
                ListeLibelle.Add(EstimeAvecRegularisation);

                CsLibelle EstimeSansRegularisation = new CsLibelle();
                EstimeSansRegularisation.CODE    = "9";
                EstimeSansRegularisation.LIBELLE = Languages.LibEstimeeSansRegularisation;
                ListeLibelle.Add(EstimeSansRegularisation);

                return(ListeLibelle);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #6
0
        public List <CsLibelle> RetourneSousMenuCompta()
        {
            CsLibelle        _ta;
            List <CsLibelle> ListeTA = new List <CsLibelle>();

            cn              = new SqlConnection(ConnectionString);
            cmd             = new SqlCommand();
            cmd.Connection  = cn;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "SPX_INTERFACE_RETOURNE_SOUS_MENUS_COMPTA_FAC";

            try
            {
                if (this.cn.State == ConnectionState.Closed)
                {
                    this.cn.Open();
                }

                SqlDataReader reader = cmd.ExecuteReader();
                if (!reader.HasRows)
                {
                    reader.Close();
                    // throw new Exception("Erreur survenue.");
                }
                while (reader.Read())
                {
                    _ta         = new CsLibelle();
                    _ta.CODE    = string.IsNullOrEmpty(reader.GetValue(0).ToString()) ? string.Empty : reader.GetValue(0).ToString().Trim();
                    _ta.LIBELLE = string.IsNullOrEmpty(reader.GetValue(1).ToString()) ? string.Empty : reader.GetValue(1).ToString().Trim();
                    ListeTA.Add(_ta);
                }
                //Fermeture reader
                reader.Close();
                return(ListeTA);
            }
            catch (Exception ex)
            {
                throw new Exception("SPX_INTERFACE_RETOURNE_SOUS_MENUS_COMPTA_FAC" + ":" + ex.Message);
            }
            finally
            {
                if (this.cn.State == ConnectionState.Open)
                {
                    this.cn.Close(); // Fermeture de la connection
                }
                cmd.Dispose();
            }
        }
Beispiel #7
0
        public List <CsLibelle> RetourneActiviteProduits()
        {
            CsLibelle        _ta;
            List <CsLibelle> ListeTA = new List <CsLibelle>();

            cn              = new SqlConnection(ConnectionString);
            cmd             = new SqlCommand();
            cmd.Connection  = cn;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = EnumProcedureStockee.SelectActiviteProduit;

            try
            {
                if (this.cn.State == ConnectionState.Closed)
                {
                    this.cn.Open();
                }

                SqlDataReader reader = cmd.ExecuteReader();
                if (!reader.HasRows)
                {
                    reader.Close();
                    throw new Exception(EnumProcedureStockee.SelectActiviteProduit + ":" + " n'a retourné aucun jeu de caractères");
                }
                while (reader.Read())
                {
                    _ta         = new CsLibelle();
                    _ta.CODE    = string.IsNullOrEmpty(reader.GetValue(0).ToString()) ? string.Empty : reader.GetValue(0).ToString().Trim();
                    _ta.LIBELLE = string.IsNullOrEmpty(reader.GetValue(1).ToString()) ? string.Empty : reader.GetValue(1).ToString().Trim();
                    ListeTA.Add(_ta);
                }
                //Fermeture reader
                reader.Close();
                return(ListeTA);
            }
            catch (Exception ex)
            {
                throw new Exception(EnumProcedureStockee.SelectActiviteProduit + ":" + ex.Message);
            }
            finally
            {
                if (this.cn.State == ConnectionState.Open)
                {
                    this.cn.Close(); // Fermeture de la connection
                }
                cmd.Dispose();
            }
        }
        /// <summary>
        /// SelectTDEM_LIBELLE_TDEM
        /// </summary>
        /// <returns></returns>
        ///
        public List <CsLibelle> SelectCoperLibelle100()
        {
            List <CsLibelle> COPER = new List <CsLibelle>();
            CsLibelle        typedem;
            CsLibelle        ObjtypedemVide = new CsLibelle();

            cn              = new SqlConnection(ConnectionString);
            cmd             = new SqlCommand();
            cmd.Connection  = cn;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = EnumProcedureStockee.SelectCOPER_LIBELLE100;

            try
            {
                if (cn.State == ConnectionState.Closed)
                {
                    cn.Open();
                }
                StartTransaction(cn);
                SqlDataReader reader = cmd.ExecuteReader();
                CommitTransaction(cmd.Transaction);

                while (reader.Read())
                {
                    typedem         = new CsLibelle();
                    typedem.CODE    = reader.GetValue(0).ToString().Trim();
                    typedem.LIBELLE = reader.GetValue(1).ToString().Trim();
                    COPER.Add(typedem);
                }
                //Fermeture reader
                reader.Close();

                return(COPER);
            }
            catch (Exception ex)
            {
                RollBackTransaction(cmd.Transaction);
                throw new Exception(EnumProcedureStockee.SelectTDEMLIBELLE + ":" + ex.Message);
            }
            finally
            {
                if (cn.State == ConnectionState.Open)
                {
                    cn.Close(); // Fermeture de la connection
                }
                cmd.Dispose();
            }
        }
Beispiel #9
0
        private List<CsLibelle> ConstruireListeSupport()
        {
            List<CsLibelle> ListeSupport = new List<CsLibelle>();

            CsLibelle Piece = new CsLibelle();
            Piece.CODE = "0";
            Piece.LIBELLE = Languages.Piece;
            ListeSupport.Add(Piece);

            CsLibelle Billet = new CsLibelle();
            Billet.CODE = "1";
            Billet.LIBELLE = Languages.Billet;
            ListeSupport.Add(Billet);

            return ListeSupport;
        }
Beispiel #10
0
        public List <CsLibelle> RetourneTousMoisComptables()
        {
            CsLibelle        _ta;
            List <CsLibelle> ListeTA = new List <CsLibelle>();

            cn              = new SqlConnection(ConnectionString);
            cmd             = new SqlCommand();
            cmd.Connection  = cn;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = EnumProcedureStockee.SelectARRETE;

            try
            {
                if (this.cn.State == ConnectionState.Closed)
                {
                    this.cn.Open();
                }

                SqlDataReader reader = cmd.ExecuteReader();
                if (!reader.HasRows)
                {
                    reader.Close();
                    // throw new Exception("Erreur survenue.");
                }
                while (reader.Read())
                {
                    _ta         = new CsLibelle();
                    _ta.LIBELLE = reader.GetValue(0).ToString().Trim();
                    ListeTA.Add(_ta);
                }
                //Fermeture reader
                reader.Close();
                return(ListeTA);
            }
            catch (Exception ex)
            {
                throw new Exception(EnumProcedureStockee.SelectARRETE + ":" + ex.Message);
            }
            finally
            {
                if (this.cn.State == ConnectionState.Open)
                {
                    this.cn.Close(); // Fermeture de la connection
                }
                cmd.Dispose();
            }
        }
        private List <CsLibelle> Fill(SqlDataReader reader, List <CsLibelle> rows, int start, int pageLength)
        {
            for (int i = 0; i < start; i++)
            {
                if (!reader.Read())
                {
                    return(rows);
                }
            }

            for (int i = 0; i < pageLength; i++)
            {
                if (!reader.Read())
                {
                    break;
                }

                CsLibelle c = new CsLibelle();
                c.fk_Site   = (Convert.IsDBNull(reader["Site"])) ? string.Empty : (System.String)reader["Site"];
                c.fk_Centre = (Convert.IsDBNull(reader["Centre"])) ? string.Empty : (System.String)reader["Centre"];
                rows.Add(c);
            }
            return(rows);
        }