示例#1
0
 public FormDetail(FormManage form3, Book book, Client client)//从图书管理界面的修改细节进入
 {
     InitializeComponent();
     this.Flag                     = 4;
     resPath                       = BookShelfService.findPath();
     this.currentBook              = book;
     this.currentClient            = client;
     this.formManage               = form3;
     this.nameTextBox.Text         = book.Name;
     this.authorTextBox.Text       = book.Author;
     this.sortTextBox.Text         = book.Sort;
     this.shelfIdTextBox.Text      = book.BookShelfId;
     this.shelfIdTextBox.ReadOnly  = true;
     this.introductionTextBox.Text = book.Description;
     if (book.imagePath != null)
     {
         if (File.Exists(book.imagePath))
         {
             FileStream fs = File.Open(book.imagePath, FileMode.Open);
             this.discoverPictureBox.Image = Image.FromStream(fs);
             fs.Close();
             //this.discoverPictureBox.Image = Image.FromFile(book.imagePath);
         }
     }
     this.appointButton.Visible   = false;
     this.lendButton.Visible      = false;
     this.recommendButton.Visible = false;
     this.addButton.Visible       = false;
 }
示例#2
0
 public FormDetail(FormManage form3, BookShelf shelf, Client client)//从图书管理界面的添加书籍进入
 {
     InitializeComponent();
     this.Flag                    = 3;
     resPath                      = BookShelfService.findPath();
     this.currentShelf            = shelf;
     this.currentClient           = client;
     this.formManage              = form3;
     this.shelfIdTextBox.Text     = shelf.BookShelfId;
     this.shelfIdTextBox.ReadOnly = true;
     this.appointButton.Visible   = false;
     this.lendButton.Visible      = false;
     this.recommendButton.Visible = false;
 }