Exemplo n.º 1
0
        /// <summary>
        /// Fügt einen Eintrag zur Buchausleih-Liste hinzu
        /// </summary>
        public void AddToAusleihList()
        {
            try
            {
                DataRow  relation;
                string[] exemlarDetails = new string[2];

                exemlarDetails[0] = Copy.CopyId.ToString();
                exemlarDetails[1] = ReturnDate.ToShortDateString();

                if (BorrowTable.Columns.Count != 2)
                {
                    BorrowTable.Columns.Add();
                    BorrowTable.Columns.Add();
                }
                relation           = BorrowTable.NewRow();
                relation.ItemArray = exemlarDetails;
                BorrowTable.Rows.Add(relation);
            }
            catch
            {
                MessageBox.Show("Beim Hinzufügen dieses Buches zur Buchausleihliste ist ein Fehler aufgetreten.",
                                "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(Name + " - Launch Date: " + LaunchDate.ToShortDateString() + " - Return Date: " + ReturnDate.ToShortDateString() + " - Space Ship: " + SpaceShip);
 }
Exemplo n.º 3
0
 public override string ToString()
 {
     return($"{MyMovie.Title}, {ReturnDate.ToShortDateString()}, {Price}");
 }