Example #1
0
 public virtual void AgregarNota(Nota nota)
 {
     Notas.ToList <Nota>().ForEach(delegate(Nota actaNota)
     {
         if (nota.Id == -1)
         {
             if (this.Id == actaNota.IdActa && actaNota.ActaImprimeAlFinal == nota.ActaImprimeAlFinal)
             {
                 throw new ApplicationException(string.Format("La Nota {0} ya existe en la acta {2}",
                                                              nota.Descripcion,
                                                              this.Descripcion));
             }
         }
         else
         {
             if (nota.Id == actaNota.Id)
             {
                 throw new ApplicationException(string.Format("La Nota {0} ya existe en la acta {2}",
                                                              nota.Descripcion,
                                                              this.Descripcion));
             }
         }
     });
     nota.Acta = this;
     Notas.Add(nota);
 }
Example #2
0
 public Caixa(List <int> notas)
 {
     foreach (var item in notas)
     {
         Notas.Add(item, 0);
     }
 }
Example #3
0
        public async void LoadDirectory()
        {
            if (!IsBusy)
            {
                IsBusy = true;
                await Task.Delay(3000);

                var notasDirectory = await NotasService.LoadNotas();

                foreach (var nota in notasDirectory.Notas)
                {
                    Notas.Add(nota);
                }
                IsBusy = false;
            }
        }
Example #4
0
 public virtual void AgregarNota(Nota nota)
 {
     nota.Estudio = this;
     Notas.Add(nota);
 }