Contact.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace CG67.FicheCollege.Domaine
  5. {
  6. [Serializable]
  7. public class Contact
  8. {
  9. /// <summary>
  10. /// Civilité du contact.
  11. /// </summary>
  12. private string mCivilite;
  13. /// <summary>
  14. /// Nom du contact.
  15. /// </summary>
  16. private string mNom;
  17. /// <summary>
  18. /// Prenom du contact.
  19. /// </summary>
  20. private string mPrenom;
  21. /// <summary>
  22. /// Fonction du contact.
  23. /// </summary>
  24. private string mFonction;
  25. /// <summary>
  26. /// Type de contact.
  27. /// </summary>
  28. private string mTypeContact;
  29. /// <summary>
  30. /// Obtient ou définit la civilité du contact.
  31. /// </summary>
  32. public string Civilite
  33. {
  34. get { return mCivilite; }
  35. set { mCivilite = value; }
  36. }
  37. /// <summary>
  38. /// Obtient ou définit le nom du contact.
  39. /// </summary>
  40. public string Nom
  41. {
  42. get { return mNom.ToUpper(); }
  43. set { mNom = value; }
  44. }
  45. /// <summary>
  46. /// Obtient ou définit le prénom du contact.
  47. /// </summary>
  48. public string Prenom
  49. {
  50. get { return Utile.formatStringPrenom(mPrenom); }
  51. set { mPrenom = value; }
  52. }
  53. /// <summary>
  54. /// Obtient ou définit la fonction du contact.
  55. /// </summary>
  56. public string Fonction
  57. {
  58. get { return mFonction; }
  59. set { mFonction = value; }
  60. }
  61. /// <summary>
  62. /// Obtient ou définit le type de contact.
  63. /// </summary>
  64. public string TypeContact
  65. {
  66. get { return mTypeContact; }
  67. set { mTypeContact = value; }
  68. }
  69. public Contact(string civilite, string nom, string prenom, string fonction, string typeContact)
  70. {
  71. this.mCivilite = civilite;
  72. this.mNom = nom;
  73. this.mPrenom = prenom;
  74. this.mFonction = fonction;
  75. this.mTypeContact = typeContact;
  76. }
  77. public Contact(string nom, string prenom, string fonction, string typeContact)
  78. {
  79. this.mNom = nom;
  80. this.mPrenom = prenom;
  81. this.mFonction = fonction;
  82. this.mTypeContact = typeContact;
  83. }
  84. }
  85. }