예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 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);
 }
예제 #4
0
파일: Legal.cs 프로젝트: sheaft-app/api
        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>();
        }
예제 #5
0
파일: Business.cs 프로젝트: sheaft-app/api
        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);
        }
예제 #6
0
파일: Legal.cs 프로젝트: sheaft-app/api
 public virtual void SetKind(LegalKind kind)
 {
     Kind = kind;
 }