示例#1
0
 public Client(PersonalData name, Address lok, Regon reg, NIP nip)
 {
     if (!name.Type.Equals(Typ.Firma))
     {
         throw new Exception("Niezgode dane.");
     }
     ClientCreate(name, lok);
     Regon = reg;
     Nip   = nip;
 }
示例#2
0
 public Client()
 {
     IdClient       = 1;
     Data           = new PersonalData();
     Localisation   = new Address();
     Regon          = new Regon();
     Nip            = new NIP();
     NumberOfPhone  = new Phone();
     MailToClient   = new Mail();
     ListOfDiscount = new HashedSet <Discount>();
 }
示例#3
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);
        }
示例#4
0
 public virtual void ChangeTypeToCompany(Regon reg, NIP nip)
 {
     Data.ChangeToCompany(this.Data.NameOfCompany);
     Regon = reg;
     Nip   = nip;
 }