Exemple #1
0
 internal Firma(IdParticipare idParticipareFirma, PlainText nume)
 {
     Contract.Requires(idParticipareFirma != null, "Id participare");
     Contract.Requires(nume != null, "nume");
     IdParticipare     = idParticipareFirma;
     Nume              = nume;
     PreturiActivitati = new Preturi();
 }
Exemple #2
0
        public void NoteazaActivitateFirma(IdParticipare idParticipareFirma, Pret pret)
        {
            Contract.Requires(idParticipareFirma != null);
            Contract.Requires(pret != null);
            Contract.Requires(Stare == StareWorkshop.InDesfasurare, "workshopul nu a inceput");

            var firma = _firmeInscrise.First(f => f.IdParticipare.Equals(idParticipareFirma));

            firma.PreturiActivitati.AdaugaPret(pret);
        }
Exemple #3
0
        public override bool Equals(object obj)
        {
            var firma = (Firma)obj;

            if (firma != null)
            {
                return(IdParticipare.Equals(firma.IdParticipare));
            }
            return(false);
        }
Exemple #4
0
 public override int GetHashCode()
 {
     return(IdParticipare.GetHashCode());
 }