No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

AccessFactory.cs

Description du code

AccessFactory.cs est un fichier du projet BiblioBrol.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.

Projet BiblioBrol :

Gestion de media en CSharp.

Pour plus d'infos, vous pouvez consulter la brève analyse.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Data;
  6. using System.Data.OleDb;
  7. using System.Data.Common;
  8. using System.Configuration;
  9. using be.gaudry.bibliobrol.model.enums;
  10. using be.gaudry.bibliobrol.model.dao.config;
  11. using be.gaudry.bibliobrol.config;
  12.  
  13. namespace be.gaudry.bibliobrol.model.dao.msaccess
  14. {
  15. public class AccessFactory:DAOFactory
  16. {
  17. private DbProviderFactory dbpf;
  18. private String connStr, provider;
  19. private AccessConfig dbConfig;
  20. public AccessFactory()
  21. {
  22. setConnectionSettings();
  23. }
  24.  
  25.  
  26. private void setConnectionSettings()
  27. {
  28. if (dbpf == null)
  29. {
  30. //provider = ConfigurationManager.ConnectionStrings[dbName].ProviderName;
  31. provider = "System.Data.OleDb";
  32. dbpf = DbProviderFactories.GetFactory(provider);
  33. }
  34. }
  35. public String getConnectionString()
  36. {
  37. /*StringBuilder str = new StringBuilder("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=");
  38.   str.Append(ConfigurationManager.AppSettings["sourceDB"]);
  39.   return str.ToString();*/
  40. if (connStr == null)
  41. {
  42. AccessConfig dbConfig = new AccessConfig();
  43. DbConnectionStringBuilder str = new DbConnectionStringBuilder();
  44. ACCESS_VERSION version = dbConfig.AccessVersion;
  45. switch (version)
  46. {
  47. case ACCESS_VERSION.Access03:
  48. str.Add("Provider", "Microsoft.Jet.OLEDB.4.0");
  49. break;
  50. case ACCESS_VERSION.Access07:
  51. str.Add("Provider", "Microsoft.ACE.OLEDB.12.0");
  52. break;
  53. }
  54.  
  55. str.Add("Data Source", dbConfig.getAdaptedPath());
  56. connStr = str.ConnectionString;
  57. }
  58. return connStr;
  59. }
  60.  
  61. public DbProviderFactory getDbpf()
  62. {
  63. return this.dbpf;
  64. }
  65.  
  66. #region getDao methods
  67. public override AbstractDBConfig getDBConfig()
  68. {
  69. return dbConfig;
  70. }
  71.  
  72. public override IConfigDao getConfigDao()
  73. {
  74. return AccessConfigDao.Instance;
  75. }
  76.  
  77. public override IPersonDao getPersonDao()
  78. {
  79. return AccessPersonDao.Instance;
  80. }
  81.  
  82. public override IBrolDao getBrolDao()
  83. {
  84. return AccessBrolDao.Instance;
  85. }
  86.  
  87. public override IMediaBrolDao getMediaBrolDao()
  88. {
  89. return AccessMediaBrolDao.Instance;
  90. }
  91.  
  92. public override ITaskDao getTaskDao()
  93. {
  94. return AccessTaskDao.Instance;
  95. }
  96.  
  97. public override IExporterDao getExporterDao()
  98. {
  99. return AccessExporterDao.Instance;
  100. }
  101.  
  102. public override IImporterDao getImporterDao()
  103. {
  104. return AccessImporterDao.Instance;
  105. }
  106.  
  107. public override IStatsDao getStatsDao()
  108. {
  109. return AccessStatsDao.Instance;
  110. }
  111.  
  112. public override ISerieDao getSerieDao()
  113. {
  114. return AccessSerieDao.Instance;
  115. }
  116. #endregion
  117. }
  118. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/msaccess/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1719990232 03/07/2024 09:03:52
| _utils0 octets1541007203 31/10/2018 18:33:23
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/msaccess/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csAccessStatsDao.cs10.59 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessImporterDao.cs27.13 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessMediaBrolDao.cs50.3 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessExporterDao.cs33.67 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessTaskDao.cs8.93 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessBrolDao.cs58.26 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessSerieDao.cs6.22 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessConfigDao.cs12.22 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessPersonDao.cs59.94 Ko31/10/2018 18:33:17-refusé-
Afficher le fichier .cs|.csAccessFactory.cs3.35 Ko31/10/2018 18:33:17-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-model/dao/msaccess/AccessFactory.cs.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.