public string ToSqlString() { var propId = Property.Id; var tenantId = Tenant.Id; var price = MonthlyPrice.ToString(CultureInfo.InvariantCulture); return($"{propId}, {tenantId}, {price}, " + $"{CastUtils.FormatSqlDate(StartDate)}, {CastUtils.FormatSqlDate(EndDate)}"); }
public override int GetHashCode() { unchecked { var hashCode = Property.GetHashCode(); hashCode = (hashCode * 397) ^ Tenant.GetHashCode(); hashCode = (hashCode * 397) ^ MonthlyPrice.GetHashCode(); hashCode = (hashCode * 397) ^ StartDate.GetHashCode(); hashCode = (hashCode * 397) ^ EndDate.GetHashCode(); hashCode = (hashCode * 397) ^ Id; return(hashCode); } }
/// <summary> /// Copy the message into the <paramref name="destination" />. /// </summary> /// <param name="destination">The object, to which copied information.</param> public override void CopyTo(ProductInfoMessage destination) { if (destination == null) { throw new ArgumentNullException(nameof(destination)); } base.CopyTo(destination); destination.Id = Id; destination.Name = Name; destination.Description = Description; destination.DescriptionRu = DescriptionRu; destination.FullDescriptionEn = FullDescriptionEn; destination.FullDescriptionRu = FullDescriptionRu; destination.PackageId = PackageId; destination.Repository = Repository; destination.Tags = Tags; destination.Author = Author; destination.MonthlyPrice = MonthlyPrice?.Clone(); destination.AnnualPrice = AnnualPrice?.Clone(); destination.LifetimePrice = LifetimePrice?.Clone(); destination.RenewPrice = RenewPrice?.Clone(); destination.RenewMonthlyPrice = RenewMonthlyPrice?.Clone(); destination.RenewAnnualPrice = RenewAnnualPrice?.Clone(); destination.DownloadCount = DownloadCount; destination.Rating = Rating; destination.DocUrl = DocUrl; destination.SupportedPlugins = SupportedPlugins; destination.ContentType = ContentType; destination.Picture = Picture; destination.Extra = Extra; destination.Scope = Scope; destination.LatestVersion = LatestVersion; destination.StubVersions = StubVersions?.ToArray(); destination.Target = Target; destination.DiscountMonthlyPrice = DiscountMonthlyPrice?.Clone(); destination.DiscountAnnualPrice = DiscountAnnualPrice?.Clone(); destination.DiscountLifetimePrice = DiscountLifetimePrice?.Clone(); destination.Categories = Categories?.ToArray(); destination.Flags = Flags; destination.PurchasedTill = PurchasedTill; }
public override string ToString() { return(MonthlyPrice.ToString("C") + "/" + Period + " (" + TotalCharge.ToString("C") + ")"); }
public override string ToString() { // Generates the text shown in the combo box return(MonthlyPrice.ToString("c") + "/" + Period + " (Total : " + TotalCharge.ToString("c") + ")"); }