Beispiel #1
0
        public void RaportActivitati(Data a, Data b)
        {
            Activitate tempAct = new Activitate("act temp", a, b);

            Console.WriteLine("Activitatile persoanei intre: " + a.ToString() + " - " + b.ToString());
            foreach (Activitate act in this.activitati)
            {
                if ((act.DataInceput <= tempAct.DataInceput && tempAct.DataInceput <= act.DataFinal) || (act.DataInceput <= tempAct.DataFinal && tempAct.DataFinal <= act.DataFinal))
                {
                    Console.WriteLine(act.ToString());
                }
            }
        }
 public override string ToString()
 {
     if (this.descriere != null)
     {
         return(this.nume + " :\t " + this.descriere + " ;\t Inceput: " + dataInceput.ToString() + " ;\t Final: " + dataFinal.ToString());
     }
     else
     {
         return(this.nume + " ;\t Inceput: " + dataInceput.ToString() + " ;\t Final: " + dataFinal.ToString());
     }
 }