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