public BorrowForm(Book book) { InitializeComponent(); this.DataContext = this; Title.Text = book.Title; var authors = ToAuthorsNames(book); if (!authors.IsNullOrEmpty()) { Author.Text = authors; } BorrowingView = new BorrowingView(); BorrowingView.Book = book; Calendar.SelectedDate = DateTime.Today; Calendar.BlackoutDates.Add(new CalendarDateRange(DateTime.Today.AddDays(1), DateTime.Today.AddDays(1).AddYears(1000))); }
public void ShowBorrowingsWindow() { BorrowingView bv = new BorrowingView(); bv.Show(); }