private void UpdateClub(int clubID, string clubName, string shortName, int establishedYear, string homeField) { if (ClubDAO.UpdateClub(clubID, clubName, shortName, establishedYear, homeField)) { MessageBox.Show("CẬP NHẬT CÂU LẠC BỘ THÀNH CÔNG", "THÔNG BÁO"); } else { MessageBox.Show("CẬP NHẬT CÂU LẠC BỘ THẤT BẠI", "THÔNG BÁO"); } }
protected void btUpdate_Click(object sender, EventArgs e) { Club club = screenToModel(); int updateOK = clubDAO.UpdateClub(club); if (updateOK == 0) // OK { String selectedValue = ListBoxClubs.SelectedValue; createClubsList(); ListBoxClubs.SelectedValue = selectedValue; showNoMessage(); } else { showErrorMessage("No record updated. " + "THE DATABASE IS TEMPORARILY OUT OF USE."); } }