Пример #1
0
        public void deleteActivity(Activitate activitateDeSters)
        {
            List <Activitate> allActivities = Activitati;

            for (int i = 0; i < allActivities.Count; i++)
            {
                if (allActivities[i].nume.Contains(activitateDeSters.nume))
                {
                    allActivities[i] = null;
                }
            }
        }
Пример #2
0
        private static Activitate GenerateActivity(Persoana p, Data inceput, Data sfarsit)
        {
            Activitate activitate = new Activitate("Activitate_01", "spalat rufe");

            activitate.Inceput = inceput;
            activitate.Sfarsit = sfarsit;
            List <Persoana> persoanteToActivitate = new List <Persoana>
            {
                p
            };

            activitate.Persoane = persoanteToActivitate;
            return(activitate);
        }
Пример #3
0
        public Agenda createAgenda()
        {
            Agenda            agendaPrima   = new Agenda();
            Data              inceput       = new Data(2020, 10, 19, 12, 45);
            Data              sfarsit       = new Data(2020, 10, 19, 13, 45);
            Activitate        activitate    = GenerateActivity(this, inceput, sfarsit);
            List <Activitate> listaToAgenda = new List <Activitate>
            {
                activitate
            };

            agendaPrima.Activitati = listaToAgenda;
            Agenda = agendaPrima;
            agendaPrima.Persoana = this;

            return(agendaPrima);
        }
Пример #4
0
 private static void InitActivities(out Activitate activitate, out Activitate activitate2, out Activitate activitate3, out Activitate activitate4, out Activitate activitate5)
 {
     activitate          = new Activitate("act_01", "spalat rufe");
     activitate.Inceput  = new Data(2000, 2, 3, 14, 15);
     activitate.Sfarsit  = new Data(2000, 2, 3, 14, 25);
     activitate2         = new Activitate("act_012", "spalat altceva");
     activitate2.Inceput = new Data(2000, 2, 3, 12, 35);
     activitate2.Sfarsit = new Data(2000, 2, 3, 14, 10);
     activitate3         = new Activitate("act_013", "spalat animale");
     activitate3.Inceput = new Data(2000, 2, 3, 16, 25);
     activitate3.Sfarsit = new Data(2000, 2, 3, 17, 10);
     activitate4         = new Activitate("act_014", "spalat animale inca o data");
     activitate4.Inceput = new Data(2000, 2, 3, 10, 35);
     activitate4.Sfarsit = new Data(2000, 2, 3, 11, 21);
     activitate5         = new Activitate("act_015", "spalat mai multe aniamle");
     activitate5.Inceput = new Data(2000, 2, 3, 8, 35);
     activitate5.Sfarsit = new Data(2000, 2, 3, 9, 10);
 }