Пример #1
0
        public override string ToString()
        {
            var    fee        = FeeToPay ? "Fee: " + Fee : "None";
            string returndate = DateOfReturn.ToString("dd.MM.yyyy");
            string borrowed   = "Borrowed: " + DateOfBorrow.ToString("dd.MM.yyyy") + " - " + returndate;
            string archived   = Book.IsArchived ? "Archived" : "Not archived";

            return(Book.Title + " : " + Book.Author + "\n\tUnique id:" + Book.UniqueId + "\n\tISBN:" + Book.CodeIsbn + "\n\tEAN:"
                   + Book.CodeEan + "\n\t" + borrowed + "\n\t" + archived + "\n\t" + Fee);
        }
Пример #2
0
        public string ToStringSave()
        {
            var fee = FeeToPay ? Fee + "" : "0";

            string borrowed = Reader.Name + "," + Reader.Surname
                              + "," + Reader.UniqueId + "," + DateOfBorrow.ToString("dd.MM.yyyy") + "," + DateOfReturn.ToString("dd.MM.yyyy");
            string archived = Book.IsArchived ? "true" : "false";

            return(Book.Title + "," + Book.Author + "," + Book.UniqueId + "," + Book.CodeIsbn + ","
                   + Book.CodeEan + "," + borrowed + "," + archived + "," + Book.CurrentLibrary?.NameOfLibrary + "," + fee);
        }