コード例 #1
0
 public Manutenção(DateTime inicio, string motivo, Funcionário func, Histórico hist)
 {
     this.inicio      = inicio;
     this.Inicio      = inicio.ToBinary();
     this.Motivo      = motivo;
     this.Funcionário = func;
     this.Histórico   = hist;
 }
コード例 #2
0
 public Locação(DateTime inicio, Histórico hist, Funcionário func, Cliente cliente)
 {
     this.inicio      = inicio;
     this.Inicio      = inicio.ToBinary();
     this.Histórico   = hist;
     this.Funcionário = func;
     this.Cliente     = cliente;
 }
コード例 #3
0
 public void adicionarHistórico(Histórico h)
 {
     if (históricos == null)
     {
         históricos = Histórico.ToList();
     }
     históricos.Add(h);
     Histórico.Add(h);
 }
コード例 #4
0
 private Relatório()
 {
     using (var ctx = new DadosContainer())
     {
         históricos = ctx.HistóricoSet.ToList();
         foreach (Histórico h in históricos)
         {
             Histórico.Add(h);
         }
         ctx.SaveChanges();
     }
 }
コード例 #5
0
 public void teste()
 {
     using (var ctx = new DadosContainer())
     {
         ctx.Attach(this);
         var hs = Histórico.ToList();
         Console.WriteLine(hs.Count);
         foreach (var h in hs)
         {
             Console.WriteLine(h.ToString());
         }
     }
 }
コード例 #6
0
 public List <Histórico> getHistóricos()
 {
     this.históricos = Histórico.ToList();
     return(this.históricos);
 }
コード例 #7
0
 public Manutenção(int anoInicio, int mesInicio, int diaInicio, int horaInicio, int minutoInicio, int segundoInicio, int anoFim, int mesFim, int diaFim, int horaFim, int minutoFim, int segundoFim, string motivo, Funcionário func, Histórico hist)
 {
     this.inicio      = new DateTime(anoInicio, mesInicio, diaInicio, horaInicio, minutoInicio, segundoInicio);
     this.Inicio      = this.inicio.ToBinary();
     this.fim         = new DateTime(anoFim, mesFim, diaFim, horaFim, minutoFim, segundoInicio);
     this.Fim         = this.fim.ToBinary();
     this.Motivo      = motivo;
     this.Funcionário = func;
     this.Histórico   = hist;
 }
コード例 #8
0
 public Locação(int anoInicio, int mesInicio, int diaInicio, int horaInicio, int minutoInicio, int segundoInicio, int anoFim, int mesFim, int diaFim, int horaFim, int minutoFim, int segundoFim, Histórico hist, Funcionário func, Cliente cliente)
 {
     this.inicio      = new DateTime(anoInicio, mesInicio, diaInicio, horaInicio, minutoInicio, segundoInicio);
     this.fim         = new DateTime(anoFim, mesFim, diaFim, horaFim, minutoFim, segundoInicio);;
     this.Histórico   = hist;
     this.Funcionário = func;
     this.Cliente     = cliente;
 }
コード例 #9
0
 public override string ToString()
 {
     return("Histórico com ID " + this.Id + "\n"
            + "Manutenções " + Histórico.stringManutenções(getManutenções()) + "\n"
            + "Locações " + Histórico.stringLocações(getLocações()) + "\n");
 }