Exemple #1
0
 public Zdarzenie(Wykaz ktoWypozyczyl, DateTime dataWypozyczenia, DateTime dataOddania)
 {
     this.IdZdarzenia      = Guid.NewGuid();
     this.KtoWypozyczyl    = ktoWypozyczyl;
     this.DataWypozyczenia = dataWypozyczenia;
     this.DataOddania      = DataOddania;
 }
Exemple #2
0
        public Zdarzenie Oddaj(Wykaz wypozyczajacy, OpisStanu stan)
        {
            Zdarzenie zdarzenie = new Oddanie(wypozyczajacy, new DateTime(), DateTime.Today.AddMonths(1));

            this.dataRepository.AddOpisStanu(stan);
            this.dataRepository.AddZdarzenie(zdarzenie);
            return(zdarzenie);
        }
Exemple #3
0
        public IEnumerable <Zdarzenie> ZdarzeniaDlaElementuWykazu(Wykaz szukanyWykaz)
        {
            List <Zdarzenie> zdarzeniaDlaWykazu = new List <Zdarzenie>();

            foreach (Zdarzenie zdarzenie in this.dataRepository.GetAllZdarzenia())
            {
                if (zdarzenie.KtoWypozyczyl == szukanyWykaz)
                {
                    zdarzeniaDlaWykazu.Add(zdarzenie);
                }
            }
            return(zdarzeniaDlaWykazu);
        }
Exemple #4
0
 public void AddCzytelnik(Wykaz czytelnik)
 {
     this.Contex.Czytelnicy.Add(czytelnik);
 }
Exemple #5
0
        public void UpdateCzytelnik(Wykaz czytelnik)
        {
            int index = this.Contex.Czytelnicy.IndexOf(this.GetCzytelnik(czytelnik.IdKarty));

            this.Contex.Czytelnicy[index] = czytelnik;
        }
Exemple #6
0
 public Wypozyczenie(Wykaz ktoWypozyczyl, DateTime dataWypozyczenia, DateTime dataOddania) : base(ktoWypozyczyl, dataWypozyczenia, dataOddania)
 {
 }