-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmploye.cs
More file actions
100 lines (88 loc) · 2.35 KB
/
Employe.cs
File metadata and controls
100 lines (88 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GesperLibrary
{
public class Employe
{
byte cadre;
int id;
string nom, prenom;
char sexe;
double salaire;
List<Diplome> lesDiplomes;
Service leService;
public Employe(int id, string nom, string prenom, char sexe, byte cadre, double salaire, Service service)
{
this.id = id;
this.nom = nom;
this.prenom = prenom;
this.sexe = sexe;
this.cadre = cadre;
this.salaire = salaire;
this.leService = service;
lesDiplomes = new List<Diplome>();
}
public string ToString()
{
return string.Format("id:{0},nom:{1},prenom:{2},sexe:{3},cadre:{4},salaire:{5},service:{6}", id, nom, prenom, sexe, cadre, salaire, this.leService.Id);
}
public string AfficherDiplome()
{
string s = "" + this.Nom + " " + this.Prenom + " :\n";
foreach (Diplome d in lesDiplomes)
{
s += string.Format("id :{0} libelle : {1}\n", d.Id, d.Libelle);
}
return s += "\n";
}
public int CountDiplome()
{
return lesDiplomes.Count();
}
public Service Service
{
get { return this.LeService; }
}
public byte Cadre
{
get { return this.cadre; }
}
public int Id
{
get { return this.id; }
}
public List<Diplome> LesDiplomes
{
get
{
return this.lesDiplomes;
}
}
public Service LeService
{
get { return this.leService; }
}
public string Nom
{
get { return this.nom; }
}
public string Prenom
{
get { return this.prenom; }
}
public double Salaire
{
get { return this.salaire; }
}
public char Sexe
{
get { return this.sexe; }
}
public void AddDiplomeEmploye(Diplome d)
{
lesDiplomes.Add(d);
}
}
}