public bool adaugareProgramare(String numeClient, String data, String ora, String telefon, List <String> servicii)
        {
            DateTime dataP;
            DateTime oraP;

            try
            {
                dataP = DateTime.ParseExact(data, "yyyy-MM-dd", null);
                oraP  = DateTime.Parse(ora);
            }catch (FormatException e)
            {
                return(false);
            }

            if (!esteNrTelefon(telefon) || servicii.Count == 0)
            {
                return(false);
            }
            //verificare sa nu mai fie programari la aceeasi ora si cu aceleasi servicii sau cu un serviciu la fel.
            List <Programare> programari = listaProgramari(data);

            if (programari != null)
            {
                foreach (Programare programareV in programari)
                {
                    if (programareV.getOra() == oraP)
                    {
                        foreach (String serviciu in servicii)
                        {
                            foreach (Serviciu serviciuP in programareV.getServicii())
                            {
                                if (serviciu.Equals(serviciuP.getNume()))
                                {
                                    return(false);
                                }
                            }
                        }
                    }
                }
            }


            List <Serviciu> serviciiList = new List <Serviciu>();

            foreach (String numeServiciu in servicii)
            {
                Serviciu ser = _serviciuDAO.getServiciu(numeServiciu);
                serviciiList.Add(ser);
            }
            Programare programare  = new Programare(numeClient, dataP, oraP, telefon, serviciiList);
            int        id_servicii = _programareDAO.addProgramare(programare);

            if (id_servicii != -1)
            {
                foreach (Serviciu serviciu in programare.getServicii())
                {
                    ProgramareServiciu programareServiciu = new ProgramareServiciu(id_servicii, serviciu.getNume());
                    _programareServiciuDAO.addProgramareServicii(programareServiciu);
                }
            }

            return(id_servicii != -1);
        }
 public bool addProgramareServiciu(ProgramareServiciu programareServiciu)
 {
     return(_programareServiciuDAO.addProgramareServicii(programareServiciu));
 }