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.

Actor.cs

Description du code

Actor.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.Generic;
  3. using System.Text;
  4.  
  5. namespace be.gaudry.bibliobrol.model
  6. {
  7. [Serializable]
  8. public class Actor : Person
  9. {
  10. #region constructor and declarations
  11.  
  12. private STATUS status;
  13. private ActorRole role;
  14. public Actor():base()
  15. {
  16. this.Status = STATUS.none;
  17. }
  18. public Actor(int id, String lastName)
  19. : this()
  20. {
  21. this.Id = id;
  22. this.LastName = lastName;
  23. }
  24. #endregion
  25.  
  26. #region overrided methods
  27. public override String ToString()
  28. {
  29. StringBuilder s = new StringBuilder(FirstName);
  30. s.Append(" ");
  31. s.Append(LastName);
  32. s.Append(" (");
  33. if(role!=null && role.Name!=null)
  34. s.Append(role.Name);
  35. else
  36. s.Append("Rôle indéterminé");
  37. s.Append(")");
  38. return s.ToString();
  39. }
  40. public override int GetHashCode()
  41. {
  42. //todo : reimplement GetHashCode
  43. return this.ToString().GetHashCode();
  44. }
  45. public override bool Equals(Object o)
  46. {
  47. //if (this == o) return true;
  48. Actor p = o as Actor;
  49. if (p == null) return false;
  50. if (this.Id != p.Id) return false;
  51. if (this.role != null)
  52. {
  53. if (!this.role.Equals(p.role)) return false;
  54. }
  55. else if (p.role!=null) return false;
  56. //if (!this.LastName.Equals(p.LastName)) return false;
  57. //if (!this.FirstName.Equals(p.FirstName)) return false;
  58. //if (!this.getBirthdate().Equals(p.getBirthdate())) return false;
  59. return true;
  60. }
  61. #endregion
  62.  
  63. #region properties
  64. public ActorRole Role
  65. {
  66. get { return this.role; }
  67. set { this.role = value; }
  68. }
  69. public STATUS Status
  70. {
  71. get { return this.status; }
  72. set { this.status = value; }
  73. }
  74. /// <summary>
  75. /// Get string with lastname, firstname, and role
  76. /// </summary>
  77. public String Display
  78. {
  79. get
  80. {
  81. /*StringBuilder display = new StringBuilder(this.ToString());
  82.   if (role!=null && role.Name != null && !role.Name.Equals(""))
  83.   {
  84.   display.Append(" (");
  85.   display.Append(role.Name);
  86.   display.Append(")");
  87.   }
  88.   return display.ToString(); */
  89. return this.ToString();
  90. }
  91. }
  92. /// <summary>
  93. /// Get string with firstname and lastname
  94. /// </summary>
  95. public String DisplayPerson
  96. {
  97. get
  98. {
  99.  
  100. return String.Format("{0} {1}", FirstName, LastName);
  101. }
  102. }
  103. #endregion
  104.  
  105. #region public methods
  106. public void setFromPerson(Person person)
  107. {
  108. this.Id = person.Id;
  109. this.LastName = person.LastName;
  110. this.FirstName = person.FirstName;
  111. this.Sex = person.Sex;
  112. }
  113. #endregion
  114.  
  115. /*
  116.   /// <summary>
  117.   /// Get person without phones or mail addresses
  118.   /// </summary>
  119.   /// <param name="reset">true if we want insert this person as a new person</param>
  120.   /// <returns></returns>
  121.   internal Person getPerson(bool reset)
  122.   {
  123.   int id = (reset)?-1:Id;
  124.   Person p = new Person(id,LastName);
  125.   p.FirstName = FirstName;
  126.   p.Pseudo = Pseudo;
  127.   p.Birthdate = Birthdate;
  128.   p.Sex = Sex;
  129.   return p;
  130.   }*/
  131. }
  132. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1716045885 18/05/2024 17:24:45
| _identity0 octets1541007175 31/10/2018 18:32:55
| _eid0 octets1541007175 31/10/2018 18:32:55
| _LightObjects0 octets1541007175 31/10/2018 18:32:55
| _comparators0 octets1541007174 31/10/2018 18:32:54
| _aws0 octets1541007173 31/10/2018 18:32:53
| _enums0 octets1541007175 31/10/2018 18:32:55
| _dao0 octets1541007174 31/10/2018 18:32:54
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csPhone.cs4.32 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csPerson.cs5.49 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csActor.cs3.86 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csBrolType.cs1.05 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csGenericContainer.cs1.41 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csStatus.cs1.24 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csQuality.cs2.2 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIBrol.cs252 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIIdentityFull.cs1.18 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBrol.cs10.49 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csUser.cs5.17 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csMedia.cs2.04 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csCounter.cs1.17 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csSerieItem.cs1.42 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIIdentityLight.cs333 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBorrow.cs2.45 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csTask.cs3.01 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csMediaBrol.cs4.97 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBrolCategory.cs856 octets31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csGenericStateContainer.cs777 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csSerie.cs688 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csModelAdapter.cs33.51 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csActorRole.cs2.72 Ko31/10/2018 18:32:23-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//Actor.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.