public TenantSubscription(TenantSubscriptionModel model)
 {
     Id            = model.Id;
     Subscription  = new Subscription(model.Subscription);
     StartDatetime = model.StartDatetime;
     EndDatetime   = model.StartDatetime.AddYears(1);
     RenewalDate   = EndDatetime.AddDays(1);
     IsActive      = model.IsActive;
     BillingAndPaymentTermsAgreementDate = model.BillingAndPaymentTermsAgreementDate;
     ServiceTermsAgreementDate           = model.ServiceTermsAgreementDate;
 }
Exemple #2
0
 //  Create entity from model.
 public Subscription(TenantSubscriptionModel model)
 {
     Id                = model.Id;
     CanonicalName     = model.Subscription.CanonicalName;
     DisplayName       = model.Subscription.DisplayName;
     Description       = model.Subscription.Description;
     Price             = model.Subscription.Price;
     IsExpired         = model.Subscription.IsExpired;
     PromotionCode     = model.Subscription.PromotionCode;
     RenewalOccurrence = model.Subscription.RenewalOccurrence;
     RenewalTimeframe  = model.Subscription.RenewalTimeframe == null ? null : new SystemLookupItemValue(model.Subscription.RenewalTimeframe);
     Highlights        = model.Subscription.Highlights;
 }