Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtTitle.Text) || Convert.ToInt32(lblID.Text) <= 0)
     {
         MessageBox.Show("One or more field haven't been filled correctly");
         return;
     }
     if (libraryApp.UpdateBook(Convert.ToInt32(lblID.Text), txtTitle.Text.Trim(), txtAuthor.Text.Trim(), txtPublisher.Text.Trim(), dtpPublished.Value))
     {
         MessageBox.Show("Update Success");
     }
     else
     {
         MessageBox.Show("Error occurred\n Please relogin if the error continues!");
     }
 }