private void OrderOrBorrow() { if (ClassBackEnd.HasBorrowed(bookIndex)) { BookBorrowButton.DM_NolImage = Properties.Resources.AlreadyBorrow; BookBorrowButton.Enabled = false; BookOrderButton.Hide(); } else if (ClassBackEnd.GetBookState(bookIndex) == 1) { BookOrderButton.Hide(); } else { if (ClassBackEnd.HasScheduled(bookIndex)) { BookOrderButton.DM_NolImage = Properties.Resources.AlreadyOrder; BookOrderButton.Enabled = false; BookBorrowButton.Hide(); } else if (ClassBackEnd.GetBookState(bookIndex) == 2) { BookBorrowButton.Hide(); BookOrderButton.Show(); } else { BookBorrowButton.Hide(); BookOrderButton.Hide(); NoUseButton.Show(); } } }
private int bookIndex;//booklist索引 public UserBookDetailForm(UserMainForm frm, int bookindex) { bookIndex = bookindex; frmMain = frm; InitializeComponent(); if (PublicVar.GuestFlag == 1) { BookBorrowButton.Hide(); BookOrderButton.Hide(); } }