public Edition(int edition_Id, Periodical id_type_Periodical, string name_Edition, decimal cost) { this.edition_Id = edition_Id; this.id_type_Periodical = id_type_Periodical; this.name_Edition = name_Edition; this.cost = cost; }
public string ShortToString() { Periodical per = id_type_Periodical; return("Название: " + per.type_Edition.ToString() + " '" + name_Edition + "'" + " Цена: " + cost + " грн"); }
public string LongToString() { Subscriber sub = id_Subscriber; Edition edition = id_Edition; Periodical per = edition.id_type_Periodical; return("Код подписки: " + subscription_Id + "; " + "\n" + "Информация о подписчике: " + sub.ToLongString() + "; " + "\n" + "Издание: " + edition.ToString() + "; " + "\n" + "Дата начала подписки: " + date_Сreation + "\n" + "Дата завершения подписки: " + date_Expiration); }
public override string ToString() { Subscriber sub = id_Subscriber; Edition edition = id_Edition; Periodical per = edition.id_type_Periodical; //return "Id: " + subscription_Id + "; " // + "\n" + "Информация о подписчике: " + "{" + sub.ToString().Replace("\n", "") + "}" + "; " // + "\n" + "Издание: " + "{" + edition.ToString().Replace("\n", "") + "}" + "; " // + "\n" + "Дата создания: " + date_Сreation // + "\n" + "Дата завершения подписки: " + date_Expiration; return(subscription_Id.ToString()); }
public override string ToString() { Periodical per = id_type_Periodical; return(per.type_Edition.ToString() + " '" + name_Edition + "', " + Decimal.Round(cost, 2) + "₴"); //return "Название: " + per.type_Edition.ToString() // + " '" + name_Edition + "'" // + " Цена: " + cost; //Periodical per = id_type_Periodical; ////return "Id: " + edition_Id + "; " //// + "\n" + "Тип издания: " + "{" + per.ToString().Replace("\n", "") + "}" + "; " //// + "\n" + "Название издания: " + name_Edition + "; " //// + "\n" + "Цена: " + cost + "; "; //return "Id: " + edition_Id // + "\n" + "Тип издания: (" + per.periodical_Id.ToString() + ") " + per.type_Edition.ToString() // + "\n" + "Название издания: " + name_Edition // + "\n" + "Цена: " + cost; }