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; }
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>(); }
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); }
public virtual void ChangeTypeToCompany(Regon reg, NIP nip) { Data.ChangeToCompany(this.Data.NameOfCompany); Regon = reg; Nip = nip; }