public override void SetKind(LegalKind kind) { if (kind != LegalKind.Natural) { throw SheaftException.Validation("Le statut légal de l'entité doit être de type personnel."); } base.SetKind(kind); }
public override void SetKind(LegalKind kind) { if (kind == LegalKind.Natural) { throw SheaftException.Validation("Une statut légal d'une société ne peut pas être de type personnel."); } base.SetKind(kind); }
public BusinessLegal(Guid id, Business business, LegalKind kind, string name, string email, string siret, string vatIdentifier, LegalAddress address, Owner owner, BillingAddress billingAddress) : base(id, kind, business, owner) { SetName(name); SetEmail(email); SetAddress(address); SetBillingAddress(billingAddress); SetSiret(siret); SetVatIdentifier(vatIdentifier); }
protected Legal(Guid id, LegalKind kind, User user, Owner owner) { Id = id; Kind = kind; Owner = owner; User = user; UserId = user.Id; Documents = new List <Document>(); }
public BusinessLegal SetLegals(LegalKind kind, string name, string email, string siret, string vatIdentifier, LegalAddress address, BillingAddress billingAddress, Owner owner, string registrationCity = null, string registrationCode = null, RegistrationKind?registrationKind = null) { if (Legal?.Id != null) { throw SheaftException.AlreadyExists("Les informations légales de cette société existent déjà."); } var legals = new BusinessLegal(Guid.NewGuid(), this, kind, name, email, siret, vatIdentifier, address, owner, billingAddress); if (registrationKind.HasValue) { legals.SetRegistrationKind(registrationKind.Value, registrationCity, registrationCode); } Legal = legals; return(legals); }
public virtual void SetKind(LegalKind kind) { Kind = kind; }