-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAluno.cs
36 lines (31 loc) · 1.17 KB
/
Aluno.cs
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
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace historico{
public class Aluno{
[Required]
public string Nome { get; set; }
[Key][Required]
public string Matricula { get; set; }
public Aluno(){}
public Aluno(string nome,string matricula){
this.Nome = nome;
this.Matricula = matricula;
}
public int HistoricoId { get; set; }
public bool isPartialEmpty(){
bool nomeIsEmpty = (Nome == null || "".Equals(Nome));
bool matriculaIsEmpty = (Matricula == null || "".Equals(Matricula));
return nomeIsEmpty || matriculaIsEmpty;
}
public bool isFullyEmpty(){
bool nomeIsEmpty = (Nome == null || "".Equals(Nome));
bool matriculaIsEmpty = (Matricula == null || "".Equals(Matricula));
return nomeIsEmpty && matriculaIsEmpty;
}
public bool isFullyFull(){
bool nomeIsEmpty = (Nome != null && !"".Equals(Nome));
bool matriculaIsEmpty = (Matricula != null && !"".Equals(Matricula));
return nomeIsEmpty && matriculaIsEmpty;
}
}
}