Пример #1
0
 public void Validate()
 {
     new Contract()
     .Requires()
     .HasMinLen(Valor.ToString(), 100, "Valor", "Valor minimo para realizar um emprestimo é R$:100")
     .IsTrue(validarGuid(IdClient.ToString()), "IdClient", "O campo identificador do cliente não pode ficar em branco")
     .IsNotNullOrEmpty(Juro.ToString(), "Juro", "O campo juro não pode ficar em branco");
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hashProductNote      = Note == null ? 0 : Note.GetHashCode();
            int hashProductInitiator = Initiator == null ? 0 : Initiator.GetHashCode();

            int hashProductId           = Id.GetHashCode();
            int hashProductIdKeyFeature = IdKeyFeature.GetHashCode();
            int hashProductIdClient     = IdClient.GetHashCode();

            return(hashProductId ^
                   hashProductIdKeyFeature ^
                   hashProductIdClient ^
                   hashProductNote ^
                   hashProductInitiator);
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (!(obj is KeyFeatureClient other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Id.Equals(other.Id) &&
                   IdKeyFeature.Equals(other.IdKeyFeature) &&
                   IdClient.Equals(other.IdClient) &&
                   Note.Equals(other.Note) &&
                   Initiator.Equals(other.Initiator));
        }
Пример #4
0
        public override string ToString()
        {
            string text = String.Format("ID klienta: {1}{0}", Environment.NewLine, IdClient.ToString()) +
                          "====================================" +
                          String.Format("Dane:{0}{0}{1}", Environment.NewLine, Data.ToString()) +
                          "====================================" +
                          String.Format("Adres:{0}{0}{1}", Environment.NewLine, Localisation.ToString()) +
                          "====================================" +
                          String.Format("Regon, NIP:{0}{1}{0}{2}", Environment.NewLine, Regon.ToString(), Nip.ToString()) +
                          "====================================" +
                          String.Format("Kontakt:{0}{1}{0}{2}", Environment.NewLine, MailToClient.ToString(), NumberOfPhone.ToString()) +
                          "====================================" +
                          String.Format("Zniżki:{0}", Environment.NewLine);

            foreach (Discount a in ListOfDiscount)
            {
                text += a.ToString() + "------------------------------------";
            }

            return(text);
        }