Exemple #1
0
 private void Btn_Confirm_Click(object sender, EventArgs e)
 {
     BindDataB();
     if (BLL.bllBook.EditBook(book))
     {
         MessageBox.Show("更新成功!");
     }
     else
     {
         MessageBox.Show("更新失败!");
     }
     //FrmQueryBook frmQueryBook = (FrmQueryBook)this.Parent;
     frmQueryBook.BindData("refresh");
     this.Close();
 }
Exemple #2
0
 private void Btn_Update_Click(object sender, EventArgs e)
 {
     if (this.textBox1.Text == "")
     {
         MessageBox.Show("名称输入不能为空!");
         return;
     }
     if (this.cb_bookType.SelectedValue.ToString() == "0")
     {
         MessageBox.Show("类型请选择!");
         return;
     }
     if (this.comboBox1.SelectedValue.ToString() == "0")
     {
         MessageBox.Show("地区请选择!");
         return;
     }
     if (this.comboBox2.SelectedValue.ToString() == "0")
     {
         MessageBox.Show("所属人请选择!");
         return;
     }
     BindData();
     this.Btn_Update.Visible = true;
     this.button2.Visible    = false;
     if (BLL.bllBook.EditBook(book))
     {
         MessageBox.Show("更新成功!");
     }
     else
     {
         MessageBox.Show("更新失败!");
     }
     //FrmQueryBook frmQueryBook = (FrmQueryBook)this.Parent;
     frmQueryBook.BindData("refresh");
     this.Close();
 }