public void AddButton_OnClick(object sender, RoutedEventArgs e)
 {
     AddBook addBook = new AddBook();
     Content.Children.Clear();
     Content.Children.Add(addBook);
     MenuToggleButton.IsChecked = true;
     MenuToggleButton.IsHitTestVisible = true;
     ToolbarName.Text = "Add Book";
     AddButton.Visibility = Visibility.Hidden;
 }
예제 #2
0
 //Add Book ---------------------
 public void addBookToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (addBook == null)
     {
         addBook = new AddBook(this);
         addBook.MdiParent = this;
         addBook.Show();
     }
     else
     {
         addBook.Activate();
     }
 }
예제 #3
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (this.dtype == DataType.Books)
     {
         string  id = this.dataGridView1.Rows[dataGridView1.SelectedRows[0].Index].Cells["ISBN"].Value.ToString();
         AddBook b  = new AddBook(id);
         b.Text = "修改图书";
         b.ShowDialog();
     }
     else if (this.dtype == DataType.Borrow)
     {
         return;
     }
     else if (this.dtype == DataType.Students)
     {
         string     id = this.dataGridView1.Rows[dataGridView1.SelectedRows[0].Index].Cells["图书证号"].Value.ToString();
         AddStudent s  = new AddStudent(id);
         s.Text = "修改学生";
         s.ShowDialog();
     }
 }
        private void button2_Click(object sender, EventArgs e)
        {
            AddBook ab = new AddBook();

            ab.Show();
        }
예제 #5
0
        private void btnAddBook_Click(object sender, EventArgs e)
        {
            AddBook b = new AddBook();

            b.ShowDialog();
        }